AnsweredAssumed Answered

Set a flag to test after reset

Question asked by Barta.Hank on Jul 11, 2015
Latest reply on Jul 11, 2015 by Clive One
Hi folks,
In my quest to leverage the built in bootloader I am employing code kindly provided by Clive to branch to the built in bootloader on the STM32F429I (As in this thread.)
I find it works if called before SystemClock_Config() in main() but not afterwards. I suppose the bootloader code expects the processor state to be that following reset and this and SystemClock_Config()  invalidates that. (My app uses Cube libraries)

My next thought is to set some kind of flag in my application that can be tested (and cleared) on the next restart before calling SystemClock_Config() . I have not found that yet. I tried using a backup register in the RTC but the HAL APIs to init, read and write those registers seem not to work before SystemClock_Config()  is called. Any other suggestions for this would be welcome.

I'm going to try GPIO next but I would prefer something the app can set/clear and nothing seems obvious to me.

Thanks!

Outcomes