Flashloader behaviour

From SEGGER Wiki
Revision as of 11:06, 2 September 2021 by Matthias (talk | contribs) (Created page with "This article describes the general behaviour of SEGGER flashloaders. == Initializing and deinitializing device == Flashloaders initialize the device before programming/erasi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This article describes the general behaviour of SEGGER flashloaders.

Initializing and deinitializing device

Flashloaders initialize the device before programming/erasing and afterwards restore it to the same state it was before the flash operation was executed. This includes:

  • Clock speed
  • System Control registers
  • Flash Control registers
  • QSPI flash initialization state
  • etc.

For the user this means that the device state before the flash operation is indistinguishable from the state afterwards.

For QSPI flashes it also means that, if the QSPI was not initialized before flash programming, it will not be afterwards and reading the flash or debugging may not work. QSPI flash is not left in an initialized state after programming, because otherwise if the user had the QSPI flash initialized and configured beforehand, it may not be in the same configuration after the flash operation (e.g. 3-Byte-Mode vs. 4-Byte-Mode).

Therefore, if the user wants to use the QSPI flash, it is in his or hers responsibility to ensure that the QSPI flash is initialized.