We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
i use a Little Assembler Program to copy a Bootloader from Flash to RAM and it works fine so far.
The question i'm asking myself: The Program starts automatically at the Reset-Vector in Flash and defines no other Interrupt Service Vector.
For me, thats's OK, because all Interrupts are disabled but what happens if a NMI appears?
For my Controller STM32F103RB, the NMI is only sourced by a so called Clock Security System.
Because i don't use it nothing happens. But what if i change the Controller some day?
Is it good Practice to handle the NMI in such a small Program or is it not neccessary?
At least you should consider the boot-loader (or any low-level software) as SoC dependent. So if you switch to another Cortex-M which uses the NMI differently, you will have to adjust the boot-loader.
Since the NMI seems to point to a "catastrophic" error, I'd rather do a reset instead of "ignoring".
Thank you for your Reply.
I found a "Application Interrupt and Reset Control Register in the System Control Block.
Is that usually a sufficient reset, or is it better to use the SOC's Watchdog if present?
I'm not really shure, if the "non-ARM" Parts of the SOC's are sufficiently involved in this Core Reset.
To be sure, you need to check the SoC's manual. It might vary.