For users of the Atmel AT91SAM7 and AT91SAM9 ARM CPU chips. Atmel has taken a new direction by combining on chip flash and ram with the ARM CPU on a single die. This provides low cost devices for small systems using the ARM CPU.
This group is to exchange information to help users get started and learn how to use the devices.
Hi,
I'd like to set the Brownout Reset for the SAM7S256.
Is it possible to program it directly with Amontoc or Samba?
So far I tried to program it through code, but had no success. Only
GPNVM0 got programmed, but not GPNVM1.
Anyone with advices? Code see below.
Regards
Thomas
/****************************************/
#define GPNVM0 (1<<8)
#define GPNVM1 (2<<8)
if ( (AT91C_BASE_MC->MC_FSR & GPNVM0) != GPNVM0 )
{
do {
status = AT91C_BASE_MC->MC_FSR;
} while (!(status & AT91C_MC_FRDY));
AT91C_BASE_MC->MC_FCR = AT91C_MC_FCMD_SET_GP_NVM
| AT91C_MC_CORRECT_KEY
| 0 ; // set GPNVM0
}
if ( (AT91C_BASE_MC->MC_FSR & GPNVM1) != GPNVM1 )
{
do {
status = AT91C_BASE_MC->MC_FSR;
} while (!(status & AT91C_MC_FRDY));
AT91C_BASE_MC->MC_FCR = AT91C_MC_FCMD_SET_GP_NVM
| AT91C_MC_CORRECT_KEY
| 1; // set GPNVM1
}

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )