Skip to main content
July 27, 2023
Solved

Facing an issue with power on reset

  • July 27, 2023
  • 10 replies
  • 5173 views

Hi, I was facing one issue..while running firmware in my device (stm32f4)in the middle suddenly controller got restarted, when I checked that RCC reset status register and I got to know that power on reset ,but I didn't restart my device only , May I know in which condition controller automatically restart by power on reset​

This topic has been closed for replies.
Best answer by TDK

What are all of the other RCC->CSR flags? They should tell the story. Perhaps a brownout error, watchdog reset, nrst pin toggling. Custom board?

10 replies

TDK
TDKBest answer
July 27, 2023

What are all of the other RCC->CSR flags? They should tell the story. Perhaps a brownout error, watchdog reset, nrst pin toggling. Custom board?

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

Thanks for the reply. Yes, I have seen the brownout reset flag  and NReset pin flag also SET ,but I didn't see any other  flags get set.. When I'm sending data through GSM at that time, mostly the power on reset and brown reset happening,  I have checked there is no Vcc drop also and I have connected to the battery too.. Yes, it is a customs board.

TDK
July 30, 2023

If the brownout reset flag is set, that suggests the supply voltage dropped below the allowable threshold. (Brownout reset forces the reset pin low, so that flag will also be set.)

If that doesn't line up with what you are measuring, perhaps the drop is short enough that you do not see it, or perhaps there is a weak/intermittent solder joint or some other hardware issue.

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

Are you sure you're not misinterpreting something? Show a screenshot of the RCC->CSR register value.

How exactly did you verify that "hardware is good"? The STMF4 is robust and not prone to resetting and setting flags randomly. If it says the voltage dropped, that's probably what happened. Perhaps something is pulling it down. Can you share the schematic? Is this a motor controller application?

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

Yes, please check below logs...I was printing RCC-CSR

20230819_154754.png

register and I disabled brownout aslo..but still it is setting..

TDK
August 19, 2023

On powerup, all three of those flags (POR, PIN, BOR) will always be set, per the reference manual.

Note that you need to clear the flags after you read them on powerup by setting RMVF. Are you doing that? Have a few other questions in my last post that you didn't answer. But I'm not real sure how much I can help apart from what I've already said without knowing your board or firmware or other details.

You're attacking the problem as if the STM32F4 is the problem here and that that flag shouldn't be set. I'd suggest trying to attack it the other way--what's happening in my circuit that is causing it to get set.

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

Hi , I'm  clearing those flags and coming to that previous post , my application will read data from  energy meters and send data through gsm to the server and this is not motor control  application

And im sorry for the inconvenience and I started learning recently and this is my first project and I don't have much knowledge about controllers.

TDK
August 19, 2023

If you're clearing flags, and all three of those flags are set when the issue happens, all indications are that it's losing power or NRST is getting reset. Could also be a spurious reset due to noise if you don't have a cap on NRST.

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