This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

clearing GPNVM2

Hi,

anyone knows of any examples for SAM7x256 for clearing GPNVM2 bit in software?
I know the eval kit has a jumper but I am using my own board and can't use a jumper to start SAM-BA.

I use this code but for some reason the system hangs and never returns from Flash_ready().

//* set the Flash controller base address
AT91PS_MC ptMC = AT91C_BASE_MC;

//* write the flash
 //* Write the Clear NVM Bit command
        ptMC->MC_FCR = AT91C_MC_CORRECT_KEY | AT91C_MC_FCMD_CLR_GP_NVM | (AT91C_MC_PAGEN & (NVM_Number << 8) ) ;

//* Wait the end of command
AT91F_Flash_Ready();

0