|
//RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); //RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3,ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC|RCC_APB2Periph_AFIO , ENABLE); GPIO_PinRemapConfig(GPIO_PartialRemap_USART3, ENABLE); RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3,ENABLE); 上面注释掉的代码,在STM32F103C8T6上,同时使用PB10和PB11,则USART3能通过中断能收到串口数据。 同样的代码,在STM32F103RET6上,同时使用PB10和PB11,则USART3不能通过中断收到串口数据。 但是修改后的未注释代码,使用PinRemap后,同时使用PC10和PC11,则USART3能通过中断收到串口数据。其它代码一样。不明原因,请指点。 谢谢。 |
微信公众号
手机版
9. This alternate function can be remapped by software to some other port pins (if available on the used package). For more details, refer to the Alternate function I/O and debug configuration section in the STM32F10xxx reference manual,available from the STMicroelectronics website: www.st.com.
评分
查看全部评分
评分
查看全部评分
评分
查看全部评分
但是在STM32F103C8T6上就没有复用,然后可以使用。
2、检查复用功能是否开启,*_msp文件中
评分
查看全部评分
评分
查看全部评分
评分
查看全部评分