![]() |
LPCOpen Platform for LPC18XX/43XX microcontrollers
18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
|
Data Structures | |
| struct | LPC_EEPROM_T |
| EEPROM register block structure. More... | |
Macros | |
| #define | EEPROM_START (0x20040000) |
| #define | EEPROM_PAGE_SIZE (128) |
| #define | EEPROM_PAGE_NUM (128) |
| #define | EEPROM_ADDRESS(page, offset) (EEPROM_START + (EEPROM_PAGE_SIZE * (page)) + offset) |
| #define | EEPROM_CLOCK_DIV 1500000 |
| #define | EEPROM_READ_WAIT_STATE_VAL 0x58 |
| #define | EEPROM_WAIT_STATE_VAL 0x232 |
| #define | EEPROM_CMD_ERASE_PRG_PAGE (6) |
| #define | EEPROM_AUTOPROG_OFF (0) |
| #define | EEPROM_AUTOPROG_AFT_1WORDWRITTEN (1) |
| #define | EEPROM_AUTOPROG_AFT_LASTWORDWRITTEN (2) |
| #define | EEPROM_PWRDWN (1 << 0) |
| #define | EEPROM_INT_ENDOFPROG (1 << 2) |
Functions | |
| STATIC INLINE void | Chip_EEPROM_EnablePowerDown (LPC_EEPROM_T *pEEPROM) |
| Put EEPROM device in power down mode. More... | |
| STATIC INLINE void | Chip_EEPROM_DisablePowerDown (LPC_EEPROM_T *pEEPROM) |
| Bring EEPROM device out of power down mode. More... | |
| void | Chip_EEPROM_Init (LPC_EEPROM_T *pEEPROM) |
| Initializes EEPROM. More... | |
| STATIC INLINE void | Chip_EEPROM_DeInit (LPC_EEPROM_T *pEEPROM) |
| De-initializes EEPROM. More... | |
| STATIC INLINE void | Chip_EEPROM_SetAutoProg (LPC_EEPROM_T *pEEPROM, uint32_t mode) |
| Set Auto program mode. More... | |
| STATIC INLINE void | Chip_EEPROM_SetReadWaitState (LPC_EEPROM_T *pEEPROM, uint32_t ws) |
| Set EEPROM Read Wait State. More... | |
| STATIC INLINE void | Chip_EEPROM_SetWaitState (LPC_EEPROM_T *pEEPROM, uint32_t ws) |
| Set EEPROM wait state. More... | |
| STATIC INLINE void | Chip_EEPROM_SetCmd (LPC_EEPROM_T *pEEPROM, uint32_t cmd) |
| Select an EEPROM command. More... | |
| void | Chip_EEPROM_EraseProgramPage (LPC_EEPROM_T *pEEPROM) |
| Erase/Program an EEPROM page. More... | |
| void | Chip_EEPROM_WaitForIntStatus (LPC_EEPROM_T *pEEPROM, uint32_t mask) |
| Wait for interrupt occurs. More... | |
| STATIC INLINE void | Chip_EEPROM_EnableInt (LPC_EEPROM_T *pEEPROM, uint32_t mask) |
| Enable EEPROM interrupt. More... | |
| STATIC INLINE void | Chip_EEPROM_DisableInt (LPC_EEPROM_T *pEEPROM, uint32_t mask) |
| Disable EEPROM interrupt. More... | |
| STATIC INLINE uint32_t | Chip_EEPROM_GetIntEnable (LPC_EEPROM_T *pEEPROM) |
| Get the value of the EEPROM interrupt enable register. More... | |
| STATIC INLINE uint32_t | Chip_EEPROM_GetIntStatus (LPC_EEPROM_T *pEEPROM) |
| Get EEPROM interrupt status. More... | |
| STATIC INLINE void | Chip_EEPROM_SetIntStatus (LPC_EEPROM_T *pEEPROM, uint32_t mask) |
| Set EEPROM interrupt status. More... | |
| STATIC INLINE void | Chip_EEPROM_ClearIntStatus (LPC_EEPROM_T *pEEPROM, uint32_t mask) |
| Clear EEPROM interrupt status. More... | |
| #define EEPROM_ADDRESS | ( | page, | |
| offset | |||
| ) | (EEPROM_START + (EEPROM_PAGE_SIZE * (page)) + offset) |
Get the eeprom address
Definition at line 52 of file eeprom_18xx_43xx.h.
| #define EEPROM_AUTOPROG_AFT_1WORDWRITTEN (1) |
Erase/program cycle is triggered after 1 word is written
Definition at line 86 of file eeprom_18xx_43xx.h.
| #define EEPROM_AUTOPROG_AFT_LASTWORDWRITTEN (2) |
Erase/program cycle is triggered after a write to AHB address ending with ......1111100 (last word of a page)
Definition at line 87 of file eeprom_18xx_43xx.h.
| #define EEPROM_AUTOPROG_OFF (0) |
Auto programming off
Definition at line 85 of file eeprom_18xx_43xx.h.
| #define EEPROM_CLOCK_DIV 1500000 |
Definition at line 53 of file eeprom_18xx_43xx.h.
| #define EEPROM_CMD_ERASE_PRG_PAGE (6) |
EEPROM erase/program command
Definition at line 80 of file eeprom_18xx_43xx.h.
| #define EEPROM_INT_ENDOFPROG (1 << 2) |
Definition at line 99 of file eeprom_18xx_43xx.h.
| #define EEPROM_PAGE_NUM (128) |
The number of EEPROM pages. The last page is not writable.
Definition at line 50 of file eeprom_18xx_43xx.h.
| #define EEPROM_PAGE_SIZE (128) |
EEPROM byes per page
Definition at line 48 of file eeprom_18xx_43xx.h.
| #define EEPROM_PWRDWN (1 << 0) |
Definition at line 94 of file eeprom_18xx_43xx.h.
| #define EEPROM_READ_WAIT_STATE_VAL 0x58 |
Definition at line 54 of file eeprom_18xx_43xx.h.
| #define EEPROM_START (0x20040000) |
EEPROM start address
Definition at line 46 of file eeprom_18xx_43xx.h.
| #define EEPROM_WAIT_STATE_VAL 0x232 |
Definition at line 55 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_ClearIntStatus | ( | LPC_EEPROM_T * | pEEPROM, |
| uint32_t | mask | ||
| ) |
Clear EEPROM interrupt status.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
| mask | : Interrupt mask (or-ed bits value of EEPROM_INT_*) |
Definition at line 263 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_DeInit | ( | LPC_EEPROM_T * | pEEPROM | ) |
De-initializes EEPROM.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
Definition at line 133 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_DisableInt | ( | LPC_EEPROM_T * | pEEPROM, |
| uint32_t | mask | ||
| ) |
Disable EEPROM interrupt.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
| mask | : Interrupt mask (or-ed bits value of EEPROM_INT_*) |
Definition at line 221 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_DisablePowerDown | ( | LPC_EEPROM_T * | pEEPROM | ) |
Bring EEPROM device out of power down mode.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
Definition at line 116 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_EnableInt | ( | LPC_EEPROM_T * | pEEPROM, |
| uint32_t | mask | ||
| ) |
Enable EEPROM interrupt.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
| mask | : Interrupt mask (or-ed bits value of EEPROM_INT_*) |
Definition at line 210 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_EnablePowerDown | ( | LPC_EEPROM_T * | pEEPROM | ) |
Put EEPROM device in power down mode.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
Definition at line 106 of file eeprom_18xx_43xx.h.
| void Chip_EEPROM_EraseProgramPage | ( | LPC_EEPROM_T * | pEEPROM | ) |
Erase/Program an EEPROM page.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
Definition at line 81 of file eeprom_18xx_43xx.c.
| STATIC INLINE uint32_t Chip_EEPROM_GetIntEnable | ( | LPC_EEPROM_T * | pEEPROM | ) |
Get the value of the EEPROM interrupt enable register.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
Definition at line 231 of file eeprom_18xx_43xx.h.
| STATIC INLINE uint32_t Chip_EEPROM_GetIntStatus | ( | LPC_EEPROM_T * | pEEPROM | ) |
Get EEPROM interrupt status.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
Definition at line 241 of file eeprom_18xx_43xx.h.
| void Chip_EEPROM_Init | ( | LPC_EEPROM_T * | pEEPROM | ) |
Initializes EEPROM.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
Definition at line 72 of file eeprom_18xx_43xx.c.
| STATIC INLINE void Chip_EEPROM_SetAutoProg | ( | LPC_EEPROM_T * | pEEPROM, |
| uint32_t | mode | ||
| ) |
Set Auto program mode.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
| mode | : Auto Program Mode (One of EEPROM_AUTOPROG_* value) |
Definition at line 145 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_SetCmd | ( | LPC_EEPROM_T * | pEEPROM, |
| uint32_t | cmd | ||
| ) |
Select an EEPROM command.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
| cmd | : EEPROM command |
Definition at line 184 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_SetIntStatus | ( | LPC_EEPROM_T * | pEEPROM, |
| uint32_t | mask | ||
| ) |
Set EEPROM interrupt status.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
| mask | : Interrupt mask (or-ed bits value of EEPROM_INT_*) |
Definition at line 252 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_SetReadWaitState | ( | LPC_EEPROM_T * | pEEPROM, |
| uint32_t | ws | ||
| ) |
Set EEPROM Read Wait State.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
| ws | : Wait State value |
Definition at line 158 of file eeprom_18xx_43xx.h.
| STATIC INLINE void Chip_EEPROM_SetWaitState | ( | LPC_EEPROM_T * | pEEPROM, |
| uint32_t | ws | ||
| ) |
Set EEPROM wait state.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
| ws | : Wait State value |
Definition at line 172 of file eeprom_18xx_43xx.h.
| void Chip_EEPROM_WaitForIntStatus | ( | LPC_EEPROM_T * | pEEPROM, |
| uint32_t | mask | ||
| ) |
Wait for interrupt occurs.
| pEEPROM | : Pointer to EEPROM peripheral block structure |
| mask | : Expected interrupt |
Definition at line 89 of file eeprom_18xx_43xx.c.
1.8.3.1