Datasheet
SAM3X / SAM3A [DATASHEET]
Atmel-11057C-ATARM-SAM3X-SAM3A-Datasheet_23-Mar-15
322
IAP software code example:
(unsigned int) (*IAP_Function)(unsigned long);
void main (void){
unsigned long FlashSectorNum = 200; //
unsigned long flash_cmd = 0;
unsigned long flash_status = 0;
unsigned long EFCIndex = 0; // 0:EEFC0, 1: EEFC1
/* Initialize the function pointer (retrieve function address from NMI vector)
*/
IAP_Function = ((unsigned long) (*)(unsigned long))
0x00800008;
/* Send your data to the sector here */
/* build the command to send to EEFC */
flash_cmd = (0x5A << 24) | (FlashSectorNum << 8) |
AT91C_MC_FCMD_EWP;
/* Call the IAP function with appropriate command */
flash_status = IAP_Function (EFCIndex, flash_cmd);
}
20.5 Hardware and Software Constraints
SAM-BA Boot uses the first 2048 bytes of the SRAM for variables and stacks. The remaining available size
can be used for user's code.
UART requirements:
12.000 MHz quartz or 12.000 MHz external clock on XIN, or
No quartz or external clock on XIN, or
Below 5.0 MHz quartz or below 5.0 MHz external clock on XIN
USB requirements:
12.000 MHz quartz or 12.000 MHz external clock on XIN. 12 MHz must be ±500 ppm and 1.8V Square
Wave Signal.
Table 20-4. Pins Driven during Boot Program Execution
Peripheral Pin PIO Line
UART URXD PA8
UART UTXD PA9










