|
Hi
I would like to lock a portion of the flash in AT91SAM7S256 and receive the LOCKE interrupt. I can lock the flash correctly and the program halts in the write attempts to locked regions, but I can't get the interrupt service routine triggered. I use the following code to register the LOCKE interrupt:
-------------------------------------------------------------------- // Enable LOCKE interrupt AT91C_BASE_MC->MC_FMR |= AT91C_MC_LOCKE;
// Disable the interrupt on the interrupt controller AIC_DisableIT( AT91C_ID_SYS );
// Configure the AIC for LOCKE interrupts AIC_ConfigureIT( AT91C_ID_SYS, AT91C_AIC_PRIOR_HIGHEST, lock_ISR ); // Enable the interrupt on the interrupt controller AIC_EnableIT( AT91C_ID_SYS ); --------------------------------------------------------------------
What is missing? Should I register it under AT91C_ID_SYS or another interrupt source? Should I enable any other flag besides AT91C_MC_LOCKE? Thank you ;)
|