Reset and Halt After Bootloader

From SEGGER Wiki
Revision as of 11:06, 7 July 2021 by Erik (talk | contribs) (Created page with "Nowadays, most MCUs have a so called boot ROM which needs to be executed after reset before jumping to the target application. The boot ROM has different tasks such as setting...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Nowadays, most MCUs have a so called boot ROM which needs to be executed after reset before jumping to the target application. The boot ROM has different tasks such as setting up clocks, enable the debug interface, initializing the peripherals depending on the different boot sources, etc... Naturally, the boot ROM behavior is different from MCU to MCU because the requirements are specific to the used device. Indeed, it's not unusual that boot ROM behavior may change between silicon revisions of the same device.

Problem

The debug architecture does not specify how the boot ROM has to be designed / needs to behave thus it is not really possible to implement a generic reset method for such MCUs where the MCU is halted on the first instruction of the target application right after the boot ROM has been executed. Instead, such devices require so called device specific reset method which handles the device specific boot ROM behavior. Implementing such a device specific reset can be quite challenging up to impossible + be really time consuming because modern MCUs usually do not only have one boot path but a variety of boot paths. Furthermore, the boot ROM behavior is usually not documented by silicon vendors for certain reasons.

Solution

in order to make sure that the MCU behaves as expected / described in the reference manual. Without executing the boot ROM, the device is in an unitialized state