2020-09-14 05:11 AM
I have a custom PCB with a STM32G431 on board and STLINkV3Mods
I wish to use PA9,10 for USART1 and PA2,3 for USART2 attached to VCP of STLINKV3MODS via 3K3 resistor.
If I use USART1 only it is OK
If I use USART2 only it is OK. See Figure 1
If I use USART1 and USART2. USART1 works OK. USART2 does not work. See Figure 2
There is a correct pattern coming out of the Micro. But he STLINKV3MODS input pin stays high. This I assume must be being driven high by the STLINK.
If I transmit a pattern before configuring the USART1 is also does not work.
Figure 1 USART2 only configured Yellow USART2 Tx pin Blue via 3k3 VCP input pin
Figure 2 USART2 only configured Yellow USART2 Tx pin Blue via 3k3 VCP input pin
Solved! Go to Solution.
2020-09-14 06:55 AM
Error found there was a short on due to badly etched PCB between USART1 and USART2
2020-09-14 05:42 AM
Further investigation. The line
MODIFY_REG(huart->Instance->CR1, USART_CR1_FIELDS, tmpreg); line in UART_SetConfig(UART_HandleTypeDef *huart) when huart is pointing to UART1 causes the STLINKV3 pin to go high but the micro side stays Low i.e PA2 stays low
2020-09-14 06:55 AM
Error found there was a short on due to badly etched PCB between USART1 and USART2
2020-09-14 03:23 PM
Thanks for coming back with the solution.
Please select your post as Best so that the thread is marked as solved.
JW