cancel
Showing results for 
Search instead for 
Did you mean: 

RTC_INIT failed and cause system hangs

MHaji.1
Senior

Hi,

When I write RTC_init() function in code which defined by stm32cube, once powerup, system goes to a hang status, after hard reset, chip works correctly... RTC clock set to LSI

when I comment RTC_init(), system works properly even, when power up and there is no need to push reset button on board...

Please help me...

3 REPLIES 3

Debug as usually - single-step into that function and into functions called from there, to find where does it hang.

JW

MHaji.1
Senior

Thanks for reply,

The problem is, system hangs occurred once board plugged, after any reset, it works fine, or after reprogramming, it works fine.... just after power on, it stuck. how can I debug this situation?

TDK
Guru

Attach a debugger to the chip in a "hung" state without resetting the processor.

To debug your program without downloading it:

Go to Debug Configurations... -> Startup -> select load image -> Edit... -> uncheck Download

To debug without resetting the device:

Go to Debug Configurations... -> Debugger -> in Reset Behavior, select "None"

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