Embedded Flash Controller Interface Peripheral

EFC0 (AT91S_EFC) 0xFFFFFF60 (AT91C_BASE_EFC0)
EFC1 (AT91S_EFC) 0xFFFFFF70 (AT91C_BASE_EFC1)

EFC Software API (AT91S_EFC)

OffsetFieldDescription
0x0EFC_FMR (MC_FMR)MC Flash Mode Register
0x4EFC_FCR (MC_FCR)MC Flash Command Register
0x8EFC_FSR (MC_FSR)MC Flash Status Register
0xCEFC_VRMC Flash Version Register

EFC Register Description

EFC: AT91_REG MC_FMR MC Flash Mode Register


For MC_FRDY, MC_LOCKE and MC_PROGE, 0: Interrupt enabled, 1: Interrupt disabled
OffsetNameDescription
0MC_FRDY
AT91C_MC_FRDY
Flash Ready
0 = FRDY high in MC_FSR does not generate an interrupt
1= FRDY high in MC_FSR generates an interrupt
2MC_LOCKE
AT91C_MC_LOCKE
Lock Error
0 = LOCKE high in MC_FSR does not generate an interrupt
1 = LOCKE high in MC_FSR generates an interrupt
3MC_PROGE
AT91C_MC_PROGE
Programming Error
0 = PROGE high in MC_FSR does not generate an interrupt
1 = PROGE high in MC_FSR generates an interrupt
7MC_NEBP
AT91C_MC_NEBP
No Erase Before Programming
0: A page erase is performed before programming.
1: No erase is performed before programming.
9..8MC_FWS
AT91C_MC_FWS
Flash Wait State
This field defines the number of wait states for read and write operations.
ValueLabelDescription
0MC_FWS_0FWS
AT91C_MC_FWS_0FWS

1 cycle for Read, 2 for Write operations
1MC_FWS_1FWS
AT91C_MC_FWS_1FWS

2 cycles for Read, 3 for Write operations
2MC_FWS_2FWS
AT91C_MC_FWS_2FWS

3 cycles for Read, 4 for Write operations
3MC_FWS_3FWS
AT91C_MC_FWS_3FWS

4 cycles for Read, 4 for Write operations
23..16MC_FMCN
AT91C_MC_FMCN
Flash Microsecond Cycle Number
This field defines the number of Master Clock cycles in one microsecond.
The value 0 corresponds to the timings for a 33.3 kHz clock.

EFC: AT91_REG MC_FCR MC Flash Command Register

OffsetNameDescription
3..0MC_FCMD
AT91C_MC_FCMD
Flash Command
This field defines the different flash commands.
ValueLabelDescription
1MC_FCMD_START_PROG
AT91C_MC_FCMD_START_PROG

Starts the programming of th epage specified by PAGEN.
2MC_FCMD_LOCK
AT91C_MC_FCMD_LOCK

Starts a lock sequence of the sector defined by the bits 4 to 7 of the field PAGEN.
3MC_FCMD_PROG_AND_LOCK
AT91C_MC_FCMD_PROG_AND_LOCK

The lock sequence automatically happens after the programming sequence is completed.
4MC_FCMD_UNLOCK
AT91C_MC_FCMD_UNLOCK

Starts an unlock sequence of the sector defined by the bits 4 to 7 of the field PAGEN.
8MC_FCMD_ERASE_ALL
AT91C_MC_FCMD_ERASE_ALL

Starts the erase of the entire flash.If at least a page is locked, the command is cancelled.
11MC_FCMD_SET_GP_NVM
AT91C_MC_FCMD_SET_GP_NVM

Set General Purpose NVM bits.
13MC_FCMD_CLR_GP_NVM
AT91C_MC_FCMD_CLR_GP_NVM

Clear General Purpose NVM bits.
15MC_FCMD_SET_SECURITY
AT91C_MC_FCMD_SET_SECURITY

Set Security Bit.
17..8MC_PAGEN
AT91C_MC_PAGEN
Page Number
This field defines the page/sector currently in use, whatever it is for programming, locking or unlocking.
31..24MC_KEY
AT91C_MC_KEY
Writing Protect Key
This field should be written with the value 0x5A to enable the command defined by the bits of the register.
If the field is written with a different value, the write is actually not performed and no action is started.

EFC: AT91_REG MC_FSR MC Flash Status Register

OffsetNameDescription
0MC_FRDY
AT91C_MC_FRDY
Flash Ready
0 = FRDY high in MC_FSR does not generate an interrupt
1= FRDY high in MC_FSR generates an interrupt
2MC_LOCKE
AT91C_MC_LOCKE
Lock Error
0 = LOCKE high in MC_FSR does not generate an interrupt
1 = LOCKE high in MC_FSR generates an interrupt
3MC_PROGE
AT91C_MC_PROGE
Programming Error
0 = PROGE high in MC_FSR does not generate an interrupt
1 = PROGE high in MC_FSR generates an interrupt
4MC_SECURITY
AT91C_MC_SECURITY
Security Bit Status
0: Security Bit is not set.
1:Security Bit is set.
8MC_GPNVM0
AT91C_MC_GPNVM0
Sector 0 Lock Status
0: General purpose NVM bit is not set.
1:General purpose NVM bit is set.
9MC_GPNVM1
AT91C_MC_GPNVM1
Sector 1 Lock Status
0: General purpose NVM bit is not set.
1:General purpose NVM bit is set.
10MC_GPNVM2
AT91C_MC_GPNVM2
Sector 2 Lock Status
0: General purpose NVM bit is not set.
1:General purpose NVM bit is set.
11MC_GPNVM3
AT91C_MC_GPNVM3
Sector 3 Lock Status
0: General purpose NVM bit is not set.
1:General purpose NVM bit is set.
12MC_GPNVM4
AT91C_MC_GPNVM4
Sector 4 Lock Status
0: General purpose NVM bit is not set.
1:General purpose NVM bit is set.
13MC_GPNVM5
AT91C_MC_GPNVM5
Sector 5 Lock Status
0: General purpose NVM bit is not set.
1:General purpose NVM bit is set.
14MC_GPNVM6
AT91C_MC_GPNVM6
Sector 6 Lock Status
0: General purpose NVM bit is not set.
1:General purpose NVM bit is set.
15MC_GPNVM7
AT91C_MC_GPNVM7
Sector 7 Lock Status
0: General purpose NVM bit is not set.
1:General purpose NVM bit is set.
16MC_LOCKS0
AT91C_MC_LOCKS0
Sector 0 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
17MC_LOCKS1
AT91C_MC_LOCKS1
Sector 1 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
18MC_LOCKS2
AT91C_MC_LOCKS2
Sector 2 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
19MC_LOCKS3
AT91C_MC_LOCKS3
Sector 3 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
20MC_LOCKS4
AT91C_MC_LOCKS4
Sector 4 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
21MC_LOCKS5
AT91C_MC_LOCKS5
Sector 5 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
22MC_LOCKS6
AT91C_MC_LOCKS6
Sector 6 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
23MC_LOCKS7
AT91C_MC_LOCKS7
Sector 7 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
24MC_LOCKS8
AT91C_MC_LOCKS8
Sector 8 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
25MC_LOCKS9
AT91C_MC_LOCKS9
Sector 9 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
26MC_LOCKS10
AT91C_MC_LOCKS10
Sector 10 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
27MC_LOCKS11
AT91C_MC_LOCKS11
Sector 11 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
28MC_LOCKS12
AT91C_MC_LOCKS12
Sector 12 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
29MC_LOCKS13
AT91C_MC_LOCKS13
Sector 13 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
30MC_LOCKS14
AT91C_MC_LOCKS14
Sector 14 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.
31MC_LOCKS15
AT91C_MC_LOCKS15
Sector 15 Lock Status
0: The corresponding sector is not locked.
1:The corresponding sector is locked.

EFC: AT91_REG MC_VR MC Flash Version Register

OffsetNameDescription
11..0EFC_VERSION
AT91C_EFC_VERSION
EFC version number
EFC version number.Value subject to change. No functionality assiciated. This is the Atmel internal version of the macrocell
18..16EFC_MFN
AT91C_EFC_MFN
EFC MFN
EFC MFN Value subject to change. No functionality assiciated