cancel
Showing results for 
Search instead for 
Did you mean: 

Error with USART 2 when attached to STLINKV3Mods VCP and USART 1 configured

DCorn
Associate III

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.

0693W000003RZ4YQAW.jpg

Figure 1 USART2 only configured Yellow USART2 Tx pin Blue via 3k3 VCP input pin

0693W000003RZ57QAG.jpg

Figure 2 USART2 only configured Yellow USART2 Tx pin Blue via 3k3 VCP input pin

1 ACCEPTED SOLUTION

Accepted Solutions
DCorn
Associate III

Error found there was a short on due to badly etched PCB between USART1 and USART2

View solution in original post

3 REPLIES 3
DCorn
Associate III

 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

DCorn
Associate III

Error found there was a short on due to badly etched PCB between USART1 and USART2

Thanks for coming back with the solution.

Please select your post as Best so that the thread is marked as solved.

JW