Flash the GPNVM bits using Segger software (Atmel Cortex-M3)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Hi,

    Via Commander:
    Sample code for setting GPNVM bit 1 which is BMS => Boot from flash (1) or internal ROM (0)

    C Source Code

    1. // FlashRegFCR = 0x400E0A04;
    2. // FlashRegFSR = 0x400E0A08;
    3. // FlashRegFRR = 0x400E0A0C;
    4. // Set GPNVM bit to "boot from flash" (0x5A << 24) | (GPNVMBitNo << 8) | (Cmd_SetGPNVMBit << 0)
    5. w4 0x400E0A04, 0x5A00010B
    6. // Wait until bit has been programmed
    7. sleep 20


    via J-Flash: Can be done by WriteU32 + Delay instructions in the Init / Exit steps that can be found at Options -> Project Settings -> CPU

    If you need an optimized version which does not use fixed delays but reads the status etc.,
    we recommend to get the J-Link SDK and write your own small application with it.


    Best regards
    Alex