cancel
Showing results for 
Search instead for 
Did you mean: 

USART receive break and reset mcu

tvill.1
Associate II

Hello,

I use STM32G0 and USART2 in IT mode or DMA mode.

When the mcu receive a break command on uart line, he reset after entering on the IRQ handler.

Have you an idea ?

Regards

18 REPLIES 18
tvill.1
Associate II

I add the report from cube MX and caal stack after the reset in irq handler.

0693W00000QKwlxQAD.png

How do you know it's BREAK which makes the mcu to reset?

Normal data Rx works OK?

If you run code which does not handle UART (e.g. a simple LED blinky), does it reset upon receiving BREAK? (this is aimed at possible hardware problem)

Try to find where BREAK is handled in the HAL handler and place a breakpoint there.

Read out and check/compare-to-working/post UART registers content.

JW

Hi @Community member​ , i have tested yout proposition with simple led blinky and i have the reset on my STM32G0B0 (with uart2 disable).

The break is handle nowhere, it's my problem and the origin of my idea about design mistake.

Other thing, my STM32G0B0 is recognized as G0B1 (mcu sourced directly from ST) on the stlink tool.

0693W00000QL5AgQAL.pngI have soldered this mcu on nucleo32-G031K8 for my prototype and already integrated on my final design.

OK so is it a hardware problem? If yes, is it related to the Nucleo itself, or your "integration"?

Which pin are we talking about exactly?

JW

it's directly the mcu design.

I use de default USART2 pin (PA2-PA3)

I have tested with USART4 and all works fine.

I think we have a real problem with this mcu G0B0 and USART2

@tvill.1​ ,

And what do you have connected to PA3? How exactly are you generating the BREAK? At what baudrate?

On the Nucleo boards, PA2/PA3 is connected to the on-board STLink, through solder bridges - did you disconnect these solder bridges?

JW

Maybe the ST-Link could be mis-handling the break, and causing a reset ... ?

(the St-Link has control of the reset line)

tvill.1
Associate II

i have not stlink on my custom designe pcb and i have still the reset.