AnsweredAssumed Answered

Feature request: SYSTEM_reset()

Question asked by Robert Poor on Nov 15, 2017
Latest reply on Nov 23, 2017 by Daniel Chen

This is carried forward from a discussion in Adapting KDS project for KBOOT flash resident bootloader 


Usually when your app starts up, you know it's waking from a reset state and therefore you can depend on the state of the peripherals and the contents of their registers.


But this doesn't hold true when your app is launched via the bootloader (either ROM or flash-resident): it leaves some peripherals in an undefined state, and it doesn't document what those registers are.  This could affect how your app behaves, even if your app doesn't use those peripherals.  One consequence is that your app may behave one way if launched directly, and behave another way (or in my case, simply crash) if launched from the bootloader.


So, because of this (and other good reasons), it would be useful to have a library routine that makes best effort to restore the entire state of the chip to its reset state.