2017-04-12 04:41 AM
Hi.
I have an stm32nucleo board with the stm32F051 chip.
In CubeMX v.4.20.1 I have created a project based on stm32F030 (F051 is not available) where USART2 and Green LED gpio are activated.
In main() I loop - toggle the LED and transmit a UART message.
I'm running Keil MDK and my project compiles successfully.
When I load the project onto the nucleo the LED starts blinking but there is no activity on the TX pin (PA2).
Does anyone have an idea of what might be wrong? (My project is attached.)
Could it be because my cubeMX project is based on a slightly different ship? In the STM32F0x Reference manual (RM0091) it seems that the F03x and F05x are very similar.
Thanks,
-Esben
#usart #cubemx #stm32f051 #nucleo2017-04-12 05:29 AM
Okay. In my troubleshooting process I discovered, that the UART message is being sent from the CN3 connector RX pin. I find this confusing. I thought the top part of the board where CN3 is located was only there to program the chip on the bottom part of the board. And why is the message being transmitted on the RX pin?
2017-04-12 08:37 AM
USART2 of your MCU is the one defaulty connected to the Virtual Com Port of the ST-LINK
USART2 TX is then connected to the CN3 RX ( from ST-LINK point of view ) to be rooted to host via USB.
How did you try to monitor activity on PA2, from Morpho/Arduino connector ?
If I remember well, due to connection to ST-LINK VCP by default the signal is not rooted to connectors ( require a SB )
2017-04-12 08:39 AM
In addition then your data transmit to USART should be visible using a Terminal properly set ( word width, baudrate etc. ) on the Virtual Com Port of your PC.
2017-04-12 08:45 AM
Oh okay that explains it. SB63, that connects the PA2 to the Morpho/Arduino connector, was left open.
Thanks for the tip.