2016-07-14 05:51 PM
Hi,
I configured USART1 to PA9/10. And I want to use PB6/7 to GPIO.First I initial the USART1 function(using PA9/10), and works well(putchar works well). But when I initial PB6/7 to GPIO by GPIO_Init() function, USART1 function does not work at this moment.PB6/7 can be configured USART1 also. I think something is related this.Please help me.Paul2016-07-14 05:56 PM
Perhaps you should show the code, it might be more apparent then what the problem actually is...
Is this on some specific board, if so state which and the connectivity.2016-07-15 04:21 AM
Hi sangdo.lee,
Check GPIO_Init configuration, if you are not assigning the PB6/PB7 to UASRT1 AF also. As mentionned in STM32F0xx reference manual , part 8.3.2 I/O pin alternate function multiplixer and mapping: ''The device I/O pins are connected to on-board peripherals/modules through a multiplexer that allows only one peripheral alternate function (AF) connected to an I/O pin at a time. In this way, there can be no conflict between peripherals available on the same I/O pin.
'' If it is the casen PA9/PA10 no more assigned to USART1 but PB6/7 instead. -Hannibal-2016-07-17 03:46 AM
Hi, Hannibal,
I had a mistake to call GPIO_Init, passing ridiculous parameter for GPIO_TypeDef* GPIOx ...THX for helpPaul