9、STM32103RB的TIM2 channel1以及UART2的CTS都是PA0 pin, 他们是怎么区分的?
答:IC的一根管脚,做多种外设的复用pin,很常见,在PA0上,只能作为一种外设的管脚,但两个外设能同时用吗,当然是可以的。可以设置STM32中有的寄存器AFIO_MAPR来配置复用管脚及外设接口的重新映射,比如你选择PA0为UART2的CTS,PA0肯定不能再作为TIM2的channel1,但可以设置TIM2的channel1的管脚为PA15,请参考如下寄存器说明: Bits 9:8 TIM2_REMAP[1:0]: TIM2 remapping These bits are set and cleared by software. They control the mapping of TIM2 channels 1 to 4 and external trigger (ETR) on the GPIO ports. 00: No remap (CH1/ETR/PA0, CH2/PA1, CH3/PA2, CH4/PA3) 01: Partial remap (CH1/ETR/PA15, CH2/PB3, CH3/PA2, CH4/PA3) 10: Partial remap (CH1/ETR/PA0, CH2/PA1, CH3/PB10, CH4/PB11) 11: Full remap (CH1/ETR/PA15, CH2/PB3, CH3/PB10, CH4/PB11)
15、F0 discovery 固件库在IAR6.0上运行时提示错误
问:IAR ELF Linker V6.40.3.54009/W32 for ARM
Copyright 2007-2012 IAR Systems AB.
Error[Li005]: no definition for "SYSCFG_EXTILineConfig" [referenced from F:新建文件夹STM32F0系列测试程序Test1DebugObjstm32f0_discovery.o]
是哪里的问题呢?我运行demo就无错误
Error[Li005]: no definition for "EXTI_Init" [referenced from F:新建文件夹STM32F0系列测试程序Test1DebugObjstm32f0_discovery.o]
2 358 bytes of readonly code memory
90 bytes of readonly data memory
1 057 bytes of readwrite data memory
Errors: 2
Warnings: none
Link time: 0.05 (CPU) 0.05 (elapsed)
Error while running Linker
Total number of errors: 2
Total number of warnings: 0
答:说明这2个没有被定义,请仔细看一下,是否正确定义。