LPCOpen Platform for LPC112X microcontrollers  112X
LPCOpen Platform for the NXP LPC112X family of Microcontrollers
Data Structures | Macros | Enumerations | Functions
CHIP: LPC11xx FLASH Memory Controller driver

Detailed Description

Data Structures

struct  LPC_FMC_T
 FLASH Memory Controller Unit register block structure. More...
 

Macros

#define FMC_FLASHSIG_BUSY   (1UL << 17)
 
#define FMC_FLASHSIG_STAT   (1 << 2)
 

Enumerations

enum  FMC_FLASHTIM_T { FLASHTIM_20MHZ_CPU = 0, FLASHTIM_40MHZ_CPU = 1, FLASHTIM_50MHZ_CPU = 2 }
 FLASH Access time definitions. More...
 

Functions

STATIC INLINE void Chip_FMC_SetFLASHAccess (FMC_FLASHTIM_T clks)
 Set FLASH access time in clocks. More...
 
STATIC INLINE void Chip_FMC_ComputeSignature (uint32_t start, uint32_t stop)
 Start computation of a signature for a FLASH memory range. More...
 
STATIC INLINE void Chip_FMC_ComputeSignatureBlocks (uint32_t start, uint32_t blocks)
 Start computation of a signature for a FLASH memory address and block count. More...
 
STATIC INLINE void Chip_FMC_ClearSignatureBusy (void)
 Clear signature generation completion flag. More...
 
STATIC INLINE bool Chip_FMC_IsSignatureBusy (void)
 Check for signature generation completion. More...
 
STATIC INLINE uint32_t Chip_FMC_GetSignature (int index)
 Returns the generated FLASH signature value. More...
 

Macro Definition Documentation

#define FMC_FLASHSIG_BUSY   (1UL << 17)

Definition at line 87 of file fmc_112x.h.

#define FMC_FLASHSIG_STAT   (1 << 2)

Definition at line 90 of file fmc_112x.h.

Enumeration Type Documentation

FLASH Access time definitions.

Enumerator
FLASHTIM_20MHZ_CPU 

Flash accesses use 1 CPU clocks. Use for up to 20 MHz CPU clock

FLASHTIM_40MHZ_CPU 

Flash accesses use 2 CPU clocks. Use for up to 40 MHz CPU clock

FLASHTIM_50MHZ_CPU 

Flash accesses use 3 CPU clocks. Use for up to 50 MHz CPU clock

Definition at line 65 of file fmc_112x.h.

Function Documentation

STATIC INLINE void Chip_FMC_ClearSignatureBusy ( void  )

Clear signature generation completion flag.

Returns
Nothing

Definition at line 128 of file fmc_112x.h.

STATIC INLINE void Chip_FMC_ComputeSignature ( uint32_t  start,
uint32_t  stop 
)

Start computation of a signature for a FLASH memory range.

Parameters
start: Starting FLASH address for computation, must be aligned on 16 byte boundary
stop: Ending FLASH address for computation, must be aligned on 16 byte boundary
Returns
Nothing
Note
Only bits 20..4 are used for the FLASH signature computation. Use the Chip_FMC_IsSignatureBusy() function to determine when the signature computation operation is complete and use the Chip_FMC_GetSignature() function to get the computed signature.

Definition at line 102 of file fmc_112x.h.

STATIC INLINE void Chip_FMC_ComputeSignatureBlocks ( uint32_t  start,
uint32_t  blocks 
)

Start computation of a signature for a FLASH memory address and block count.

Parameters
start: Starting FLASH address for computation, must be aligned on 16 byte boundary
blocks: Number of 16 byte blocks used for computation
Returns
Nothing
Note
Only bits 20..4 are used for the FLASH signature computation. Use the Chip_FMC_IsSignatureBusy() function to determine when the signature computation operation is complete and the Chip_FMC_GetSignature() function to get the computed signature.

Definition at line 119 of file fmc_112x.h.

STATIC INLINE uint32_t Chip_FMC_GetSignature ( int  index)

Returns the generated FLASH signature value.

Parameters
index: Signature index to get - use 0 to FMSW0, 1 to FMSW1, etc.
Returns
the generated FLASH signature value

Definition at line 147 of file fmc_112x.h.

STATIC INLINE bool Chip_FMC_IsSignatureBusy ( void  )

Check for signature generation completion.

Returns
true if the signature computation is running, false if finished

Definition at line 137 of file fmc_112x.h.

STATIC INLINE void Chip_FMC_SetFLASHAccess ( FMC_FLASHTIM_T  clks)

Set FLASH access time in clocks.

Parameters
clks: Clock cycles for FLASH access (minus 1)
Returns
Nothing
Note
For CPU speed up to 20MHz, use a value of 0. For up to 40MHz, use a value of 1. For up to 50MHz, use a value of 2.

Definition at line 78 of file fmc_112x.h.