cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C031 Reseting after receiving data on UART

gabrielCermob
Associate II

Hello, I'm having problems with a simple task: receive blocks of data from UART. The blocks are sequences of 1-300 bytes, that are receiveid with a 1 second interval. The value is stored in one buffer of 350 bytes.

When I send a big block of 270 bytes after other blocks(of 60 bytes by example) in that 1s interval, the Stm32 RESETS! But if the interval is longer, like 5 seconds, it doesn't reset and receive the data correctly. 

I tried with pooling and interruption, the result is the same. I'm using 115200 baud. Lowering the baud rate also reduces the interval that doesn't cause a reset, but I can't use this solution.

WatchDog is already disabled. By this moment, the code doesn't do anything more.

10 REPLIES 10

Good catch!

Please mark the solution.

This is always a problem with using the debugger from a dev kit - there may still be connections from the dev kit, and they can affect your external target.

I would strongly recommend that you get a standalone debugger.

Failing that, you can break off the ST-Link part of the Nucleo board - so ensure no "phantom" connections.

 

See this and this.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.