![]() |
LPCOpen Platform for LPC112X microcontrollers
112X
LPCOpen Platform for the NXP LPC112X family of Microcontrollers
|
Data Structures | |
struct | LPC_SYSCON_T |
LPC1125 System Control block structure. More... | |
Macros | |
#define | SYSCON_RST_POR (1 << 0) |
#define | SYSCON_RST_EXTRST (1 << 1) |
#define | SYSCON_RST_WDT (1 << 2) |
#define | SYSCON_RST_BOD (1 << 3) |
#define | SYSCON_RST_SYSRST (1 << 4) |
#define | SYSCON_NMISRC_ENABLE ((uint32_t) 1 << 31) |
#define | SYSCON_DEEPSLP_BOD_PD (1 << 3) |
#define | SYSCON_DEEPSLP_WDTOSC_PD (1 << 6) |
#define | SYSCON_SLPWAKE_IRCOUT_PD (1 << 0) |
#define | SYSCON_SLPWAKE_IRC_PD (1 << 1) |
#define | SYSCON_SLPWAKE_FLASH_PD (1 << 2) |
#define | SYSCON_SLPWAKE_BOD_PD (1 << 3) |
#define | SYSCON_SLPWAKE_ADC_PD (1 << 4) |
#define | SYSCON_SLPWAKE_SYSOSC_PD (1 << 5) |
#define | SYSCON_SLPWAKE_WDTOSC_PD (1 << 6) |
#define | SYSCON_SLPWAKE_SYSPLL_PD (1 << 7) |
#define | SYSCON_POWERDOWN_IRCOUT_PD (1 << 0) |
#define | SYSCON_POWERDOWN_IRC_PD (1 << 1) |
#define | SYSCON_POWERDOWN_FLASH_PD (1 << 2) |
#define | SYSCON_POWERDOWN_BOD_PD (1 << 3) |
#define | SYSCON_POWERDOWN_ADC_PD (1 << 4) |
#define | SYSCON_POWERDOWN_SYSOSC_PD (1 << 5) |
#define | SYSCON_POWERDOWN_WDTOSC_PD (1 << 6) |
#define | SYSCON_POWERDOWN_SYSPLL_PD (1 << 7) |
Functions | |
STATIC INLINE void | Chip_SYSCON_Map (CHIP_SYSCON_BOOT_MODE_REMAP_T remap) |
Re-map interrupt vectors. More... | |
STATIC INLINE void | Chip_SYSCON_AssertPeriphReset (CHIP_SYSCON_PERIPH_RESET_T periph) |
Assert reset for a peripheral. More... | |
STATIC INLINE void | Chip_SYSCON_DeassertPeriphReset (CHIP_SYSCON_PERIPH_RESET_T periph) |
De-assert reset for a peripheral. More... | |
STATIC INLINE void | Chip_SYSCON_PeriphReset (CHIP_SYSCON_PERIPH_RESET_T periph) |
Resets a peripheral. More... | |
STATIC INLINE uint32_t | Chip_SYSCON_GetSystemRSTStatus (void) |
Get system reset status. More... | |
STATIC INLINE void | Chip_SYSCON_ClearSystemRSTStatus (uint32_t reset) |
Clear system reset status. More... | |
STATIC INLINE uint32_t | Chip_SYSCON_GetPORPIOStatus (int index) |
Read POR captured PIO status. More... | |
STATIC INLINE void | Chip_SYSCON_SetBODLevels (CHIP_SYSCON_BODRSTLVL_T rstlvl, CHIP_SYSCON_BODRINTVAL_T intlvl) |
Set brown-out detection interrupt and reset levels. More... | |
STATIC INLINE void | Chip_SYSCON_EnableBODReset (void) |
Enable brown-out detection reset. More... | |
STATIC INLINE void | Chip_SYSCON_DisableBODReset (void) |
Disable brown-out detection reset. More... | |
STATIC INLINE void | Chip_SYSCON_SetSYSTCKCAL (uint32_t sysCalVal) |
Set System tick timer calibration value. More... | |
STATIC INLINE void | Chip_SYSCON_SetIRQLatency (uint32_t latency) |
Set System IRQ latency. More... | |
STATIC INLINE uint32_t | Chip_SYSCON_GetIRQLatency (void) |
Get System IRQ latency. More... | |
STATIC INLINE void | Chip_SYSCON_SetNMISource (uint32_t intsrc) |
Set source for non-maskable interrupt (NMI) More... | |
STATIC INLINE void | Chip_SYSCON_EnableNMISource (void) |
Enable interrupt used for NMI source. More... | |
STATIC INLINE void | Chip_SYSCON_DisableNMISource (void) |
Disable interrupt used for NMI source. More... | |
STATIC INLINE void | Chip_SYSCON_SetStartPin (uint32_t pin, uint32_t edge) |
Set edge for PIO start logic. More... | |
STATIC INLINE void | Chip_SYSCON_EnableStartPin (uint32_t pin) |
Enable PIO start logic for a pin. More... | |
STATIC INLINE void | Chip_SYSCON_DisableStartPin (uint32_t pin) |
Disable PIO start logic for a pin. More... | |
STATIC INLINE void | Chip_SYSCON_ResetStartPin (uint32_t pin) |
Clear PIO start logic state. More... | |
STATIC INLINE bool | Chip_SYSCON_GetStartPinStatus (uint32_t pin) |
Returns status of pin wakeup. More... | |
void | Chip_SYSCON_SetDeepSleepPD (uint32_t sleepmask) |
Setup deep sleep behaviour for power down. More... | |
STATIC INLINE uint32_t | Chip_SYSCON_GetDeepSleepPD (void) |
Returns current deep sleep mask. More... | |
void | Chip_SYSCON_SetWakeup (uint32_t wakeupmask) |
Setup wakeup behaviour from deep sleep. More... | |
STATIC INLINE uint32_t | Chip_SYSCON_GetWakeup (void) |
Return current wakeup mask. More... | |
void | Chip_SYSCON_PowerDown (uint32_t powerdownmask) |
Power down one or more blocks or peripherals. More... | |
void | Chip_SYSCON_PowerUp (uint32_t powerupmask) |
Power up one or more blocks or peripherals. More... | |
STATIC INLINE uint32_t | Chip_SYSCON_GetPowerStates (void) |
Get power status. More... | |
#define SYSCON_DEEPSLP_BOD_PD (1 << 3) |
Deep sleep setup valuesBOD power-down control in Deep-sleep mode, powered down
Definition at line 385 of file syscon_112x.h.
#define SYSCON_DEEPSLP_WDTOSC_PD (1 << 6) |
Watchdog oscillator power control in Deep-sleep, powered down
Definition at line 386 of file syscon_112x.h.
#define SYSCON_NMISRC_ENABLE ((uint32_t) 1 << 31) |
Non-Maskable Interrupt Enable/Disable valueEnable the Non-Maskable Interrupt (NMI) source
Definition at line 173 of file syscon_112x.h.
#define SYSCON_POWERDOWN_ADC_PD (1 << 4) |
ADC power down
Definition at line 451 of file syscon_112x.h.
#define SYSCON_POWERDOWN_BOD_PD (1 << 3) |
BOD power down
Definition at line 450 of file syscon_112x.h.
#define SYSCON_POWERDOWN_FLASH_PD (1 << 2) |
Flash power down
Definition at line 449 of file syscon_112x.h.
#define SYSCON_POWERDOWN_IRC_PD (1 << 1) |
IRC oscillator power-down
Definition at line 448 of file syscon_112x.h.
#define SYSCON_POWERDOWN_IRCOUT_PD (1 << 0) |
Power down configuration valuesIRC oscillator output power down
Definition at line 447 of file syscon_112x.h.
#define SYSCON_POWERDOWN_SYSOSC_PD (1 << 5) |
System oscillator power down
Definition at line 452 of file syscon_112x.h.
#define SYSCON_POWERDOWN_SYSPLL_PD (1 << 7) |
System PLL power down
Definition at line 454 of file syscon_112x.h.
#define SYSCON_POWERDOWN_WDTOSC_PD (1 << 6) |
Watchdog oscillator power down
Definition at line 453 of file syscon_112x.h.
#define SYSCON_RST_BOD (1 << 3) |
Brown-out detect reset status
Definition at line 167 of file syscon_112x.h.
#define SYSCON_RST_EXTRST (1 << 1) |
External reset status
Definition at line 165 of file syscon_112x.h.
#define SYSCON_RST_POR (1 << 0) |
System reset statusPOR reset status
Definition at line 164 of file syscon_112x.h.
#define SYSCON_RST_SYSRST (1 << 4) |
software system reset status
Definition at line 168 of file syscon_112x.h.
#define SYSCON_RST_WDT (1 << 2) |
Watchdog reset status
Definition at line 166 of file syscon_112x.h.
#define SYSCON_SLPWAKE_ADC_PD (1 << 4) |
ADC wake-up configuration
Definition at line 417 of file syscon_112x.h.
#define SYSCON_SLPWAKE_BOD_PD (1 << 3) |
BOD wake-up configuration
Definition at line 416 of file syscon_112x.h.
#define SYSCON_SLPWAKE_FLASH_PD (1 << 2) |
Flash wake-up configuration
Definition at line 415 of file syscon_112x.h.
#define SYSCON_SLPWAKE_IRC_PD (1 << 1) |
IRC oscillator power-down wake-up configuration
Definition at line 414 of file syscon_112x.h.
#define SYSCON_SLPWAKE_IRCOUT_PD (1 << 0) |
Deep sleep to wakeup setup valuesIRC oscillator output wake-up configuration
Definition at line 413 of file syscon_112x.h.
#define SYSCON_SLPWAKE_SYSOSC_PD (1 << 5) |
System oscillator wake-up configuration
Definition at line 418 of file syscon_112x.h.
#define SYSCON_SLPWAKE_SYSPLL_PD (1 << 7) |
System PLL wake-up configuration
Definition at line 420 of file syscon_112x.h.
#define SYSCON_SLPWAKE_WDTOSC_PD (1 << 6) |
Watchdog oscillator wake-up configuration
Definition at line 419 of file syscon_112x.h.
Brown-out detector interrupt level
Enumerator | |
---|---|
SYSCON_BODINTVAL_RESERVED1 | |
SYSCON_BODINTVAL_2_22V |
Brown-out interrupt at 2.22v |
SYSCON_BODINTVAL_2_52V |
Brown-out interrupt at 2.52v |
SYSCON_BODINTVAL_2_80V |
Brown-out interrupt at 2.8v |
Definition at line 220 of file syscon_112x.h.
Brown-out detector reset level
Definition at line 210 of file syscon_112x.h.
System memory remap modes used to remap interrupt vectors
Definition at line 103 of file syscon_112x.h.
Peripheral reset identifiers, not available on all devices
Enumerator | |
---|---|
RESET_SSP0 |
SSP0 reset control |
RESET_I2C0 |
I2C0 reset control |
RESET_SSP1 |
SSP1 reset control |
Definition at line 122 of file syscon_112x.h.
STATIC INLINE void Chip_SYSCON_AssertPeriphReset | ( | CHIP_SYSCON_PERIPH_RESET_T | periph | ) |
Assert reset for a peripheral.
periph | : Peripheral to assert reset for |
Definition at line 135 of file syscon_112x.h.
Clear system reset status.
reset | : An Or'ed value of SYSCON_RST_* status to clear |
Definition at line 191 of file syscon_112x.h.
STATIC INLINE void Chip_SYSCON_DeassertPeriphReset | ( | CHIP_SYSCON_PERIPH_RESET_T | periph | ) |
De-assert reset for a peripheral.
periph | : Peripheral to de-assert reset for |
Definition at line 145 of file syscon_112x.h.
Disable PIO start logic for a pin.
pin | : PIO pin number |
Definition at line 355 of file syscon_112x.h.
Enable PIO start logic for a pin.
pin | : PIO pin number |
Definition at line 344 of file syscon_112x.h.
Returns current deep sleep mask.
Definition at line 405 of file syscon_112x.h.
Read POR captured PIO status.
index | : POR register index, 0 or 1 |
Definition at line 202 of file syscon_112x.h.
Get power status.
Definition at line 475 of file syscon_112x.h.
Returns status of pin wakeup.
pin | : PIO pin number |
Definition at line 377 of file syscon_112x.h.
Get system reset status.
Definition at line 180 of file syscon_112x.h.
Return current wakeup mask.
Definition at line 439 of file syscon_112x.h.
STATIC INLINE void Chip_SYSCON_Map | ( | CHIP_SYSCON_BOOT_MODE_REMAP_T | remap | ) |
Re-map interrupt vectors.
remap | : system memory map value |
Definition at line 114 of file syscon_112x.h.
STATIC INLINE void Chip_SYSCON_PeriphReset | ( | CHIP_SYSCON_PERIPH_RESET_T | periph | ) |
Resets a peripheral.
periph | : Peripheral to reset |
Definition at line 155 of file syscon_112x.h.
void Chip_SYSCON_PowerDown | ( | uint32_t | powerdownmask | ) |
Power down one or more blocks or peripherals.
powerdownmask | : OR'ed values of SYSCON_POWERDOWN_* values |
Definition at line 75 of file syscon_112x.c.
void Chip_SYSCON_PowerUp | ( | uint32_t | powerupmask | ) |
Power up one or more blocks or peripherals.
powerupmask | : OR'ed values of SYSCON_POWERDOWN_* values |
Definition at line 86 of file syscon_112x.c.
Clear PIO start logic state.
pin | : PIO pin number |
Definition at line 366 of file syscon_112x.h.
STATIC INLINE void Chip_SYSCON_SetBODLevels | ( | CHIP_SYSCON_BODRSTLVL_T | rstlvl, |
CHIP_SYSCON_BODRINTVAL_T | intlvl | ||
) |
Set brown-out detection interrupt and reset levels.
rstlvl | : Brown-out detector reset level |
intlvl | : Brown-out interrupt level |
Definition at line 235 of file syscon_112x.h.
void Chip_SYSCON_SetDeepSleepPD | ( | uint32_t | sleepmask | ) |
Setup deep sleep behaviour for power down.
sleepmask | : OR'ed values of SYSCON_DEEPSLP_* values (high to powerdown on deepsleep) |
Definition at line 61 of file syscon_112x.c.
Set System IRQ latency.
latency | : Latency in clock ticks |
Definition at line 277 of file syscon_112x.h.
Set source for non-maskable interrupt (NMI)
intsrc | : IRQ number to assign to the NMI |
Definition at line 298 of file syscon_112x.h.
Set edge for PIO start logic.
pin | : PIO pin number |
edge | : 0 for falling edge, 1 for rising edge |
Definition at line 328 of file syscon_112x.h.
Set System tick timer calibration value.
sysCalVal | : System tick timer calibration value |
Definition at line 265 of file syscon_112x.h.
void Chip_SYSCON_SetWakeup | ( | uint32_t | wakeupmask | ) |
Setup wakeup behaviour from deep sleep.
wakeupmask | : OR'ed values of SYSCON_SLPWAKE_* values (high is powered down) |
Definition at line 68 of file syscon_112x.c.