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.

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

    Hello!

    I'm trying to find a way to change the GPNVM bits of the Atmel Cortex-M3 chip AT91SAM3X.

    Is is possible to do this with J-Flash/J-Link Commander software? (using a J-Link Pro).

    Thank you,
    Paule
  • Hi Paule,

    In general, this is possible.
    This can be done via a relatively simple sequence of memory commands.
    Could you please let me know which GPNVM bit you want to modify?
    I will then check, if we can provide some sample code short term.


    - Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.