Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Interrupt for Locked Flash Error (LOCKE)
PostPosted: Wed Oct 05, 2011 1:59 pm 
Offline

Joined: Wed Oct 05, 2011 1:03 pm
Posts: 1
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 ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: