[ANSWERED/SOLVED] J-Flash ARM - setting GPNVM bit 2 on AT91SAM7X256

  • [ANSWERED/SOLVED] J-Flash ARM - setting GPNVM bit 2 on AT91SAM7X256

    Hello.

    I am trying to figure out how to set the GPNVM bit (2) after programming the device.
    Until now, I programm the device using J-Flash, and then use a Script for SAM-BA to
    set the GPNVM bit. Without that, the controller will not boot from Flash.
    But this method is very circuitous.

    Is there a way to set the bit in J-Flash?
  • Hi jobi,

    as far as I can see GPNVM bit 2 is automatically set by the RAMCode, if not already set.
    It is possible that in old versions of J-Flash this was not performed automatically. Which version do you use?

    However, to set any GPNVM bit on the AT91SAM7X128/256/512, simply add the following lines to your init sequence in J-Flash:

    Source Code

    1. 0xFFFFFF64 Write 32bit 0x5A00020B // Set General purpose bit 2, to set another GPNVM bit, change "2" to the number of the GPNVM bit
    2. Read 32bit 0xFFFFFF68 // Wait for operation to complete
    3. Var AND 0x00000001
    4. Var BEQ #x // x = Index of Init command: Read 32bit 0xFFFFFF68


    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.