cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C031 Reseting after receiving data on UART

gabrielCermob
Visitor

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.

2 REPLIES 2
Andrew Neil
Super User

Welcome to the forum.

Please see  How to write your question to maximize your chances to find a solution for best results.

 

Please show the relevant code - see: How to insert source code.

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.
TDK
Super User

There is no direct link between receiving UART and resetting the chip. The reason has to be something specific to your code or hardware.

 

How do you know it's getting reset?

Read the flags in RCC_CSR2 on startup to determine the cause of the reset.

TDK_0-1762205687282.png

 

If you feel a post has answered your question, please click "Accept as Solution".