Go to the documentation of this file.
32 #ifndef __SYSCTL_11XX_H_
33 #define __SYSCTL_11XX_H_
139 #if !defined(CHIP_LPC1125)
188 #define SYSCTL_RST_POR (1 << 0)
189 #define SYSCTL_RST_EXTRST (1 << 1)
190 #define SYSCTL_RST_WDT (1 << 2)
191 #define SYSCTL_RST_BOD (1 << 3)
192 #define SYSCTL_RST_SYSRST (1 << 4)
197 #define SYSCTL_NMISRC_ENABLE ((uint32_t) 1 << 31)
204 STATIC INLINE uint32_t Chip_SYSCTL_GetSystemRSTStatus(void)
235 #if defined(CHIP_LPC11CXX) || defined(CHIP_LPC11EXX) || defined(CHIP_LPC11UXX) || defined(CHIP_LPC11XXLV) || defined(CHIP_LPC1125)
236 SYSCTL_BODRSTLVL_1_46V,
240 #if defined(CHIP_LPC11XXLV)
242 SYSCTL_BODRSTLVL_RESERVED2,
243 SYSCTL_BODRSTLVL_RESERVED3,
244 #elif defined(CHIP_LPC11AXX)
245 SYSCTL_BODRSTLVL_RESERVED2,
246 SYSCTL_BODRSTLVL_2_52V,
247 SYSCTL_BODRSTLVL_2_80V,
260 #if defined(CHIP_LPC110X) || defined(CHIP_LPC11CXX) || defined(CHIP_LPC11EXX) || defined(CHIP_LPC11UXX) || defined(CHIP_LPC1125)
261 SYSCTL_BODINTVAL_2_22V,
262 SYSCTL_BODINTVAL_2_52V,
263 SYSCTL_BODINTVAL_2_80V,
281 #if defined(CHIP_LPC11AXX)
288 return (
bool) ((
LPC_SYSCTL->BODCTRL & (1 << 6)) != 0);
322 #if defined(CHIP_LPC11EXX) || defined(CHIP_LPC11UXX) || defined(CHIP_LPC1125)
346 #if defined(CHIP_LPC11AXX) || defined(CHIP_LPC11CXX) || defined(CHIP_LPC11EXX) || defined(CHIP_LPC11UXX) || defined(CHIP_LPC1125)
379 #if defined(CHIP_LPC11AXX)
392 #elif defined(CHIP_LPC11EXX) || defined(CHIP_LPC11UXX)
407 #if defined(CHIP_LPC11UXX)
417 LPC_SYSCTL->USBCLKCTRL = ap_clk | (pol_clk << 1);
426 return (
bool) ((
LPC_SYSCTL->USBCLKST & 0x1) != 0);
431 #if defined(CHIP_LPC110X) || defined(CHIP_LPC11XXLV) || defined(CHIP_LPC11CXX) || defined(CHIP_LPC1125)
495 #if defined(CHIP_LPC11EXX) || defined(CHIP_LPC11UXX)
521 #define SYSCTL_WAKEUP_WWDTINT (1 << 12)
522 #define SYSCTL_WAKEUP_BODINT (1 << 13)
523 #define SYSCTL_WAKEUP_USB_WAKEUP (1 << 19)
524 #define SYSCTL_WAKEUP_GPIOINT0 (1 << 20)
525 #define SYSCTL_WAKEUP_GPIOINT1 (1 << 21)
532 STATIC INLINE void Chip_SYSCTL_EnablePeriphWakeup(uint32_t periphmask)
549 #if !defined(LPC11AXX)
553 #define SYSCTL_DEEPSLP_BOD_PD (1 << 3)
554 #define SYSCTL_DEEPSLP_WDTOSC_PD (1 << 6)
555 #if defined(CHIP_LPC11XXLV)
556 #define SYSCTL_DEEPSLP_IRCOUT_PD (1 << 0)
557 #define SYSCTL_DEEPSLP_IRC_PD (1 << 1)
585 #define SYSCTL_SLPWAKE_IRCOUT_PD (1 << 0)
586 #define SYSCTL_SLPWAKE_IRC_PD (1 << 1)
587 #define SYSCTL_SLPWAKE_FLASH_PD (1 << 2)
588 #define SYSCTL_SLPWAKE_BOD_PD (1 << 3)
589 #define SYSCTL_SLPWAKE_ADC_PD (1 << 4)
590 #define SYSCTL_SLPWAKE_SYSOSC_PD (1 << 5)
591 #define SYSCTL_SLPWAKE_WDTOSC_PD (1 << 6)
592 #define SYSCTL_SLPWAKE_SYSPLL_PD (1 << 7)
593 #if defined(CHIP_LPC11UXX)
594 #define SYSCTL_SLPWAKE_USBPLL_PD (1 << 8)
595 #define SYSCTL_SLPWAKE_USBPAD_PD (1 << 10)
625 #define SYSCTL_POWERDOWN_IRCOUT_PD (1 << 0)
626 #define SYSCTL_POWERDOWN_IRC_PD (1 << 1)
627 #define SYSCTL_POWERDOWN_FLASH_PD (1 << 2)
628 #if !defined(CHIP_LPC11AXX)
629 #define SYSCTL_POWERDOWN_BOD_PD (1 << 3)
631 #define SYSCTL_POWERDOWN_ADC_PD (1 << 4)
632 #define SYSCTL_POWERDOWN_SYSOSC_PD (1 << 5)
633 #define SYSCTL_POWERDOWN_WDTOSC_PD (1 << 6)
634 #define SYSCTL_POWERDOWN_SYSPLL_PD (1 << 7)
635 #if defined(CHIP_LPC11UXX)
636 #define SYSCTL_POWERDOWN_USBPLL_PD (1 << 8)
637 #define SYSCTL_POWERDOWN_USBPAD_PD (1 << 10)
639 #if defined(CHIP_LPC11AXX)
640 #define SYSCTL_POWERDOWN_LFOSC_PD (1 << 13)
641 #define SYSCTL_POWERDOWN_DAC_PD (1 << 14)
642 #define SYSCTL_POWERDOWN_TS_PD (1 << 15)
643 #define SYSCTL_POWERDOWN_ACOMP_PD (1 << 16)
@ SYSCTL_BODINTVAL_RESERVED1
STATIC INLINE uint32_t Chip_SYSCTL_GetDeepSleepPD(void)
Returns current deep sleep mask.
__IO uint32_t SYSPLLCLKSEL
STATIC INLINE uint32_t Chip_SYSCTL_GetDeviceID(void)
Return the device ID.
STATIC INLINE uint32_t Chip_SYSCTL_GetPowerStates(void)
Get power status.
STATIC INLINE void Chip_SYSCTL_DeassertPeriphReset(CHIP_SYSCTL_PERIPH_RESET_T periph)
De-assert reset for a peripheral.
STATIC INLINE void Chip_SYSCTL_PeriphReset(CHIP_SYSCTL_PERIPH_RESET_T periph)
Resets a peripheral.
STATIC INLINE void Chip_SYSCTL_DisableBODReset(void)
Disable brown-out detection reset.
STATIC INLINE void Chip_SYSCTL_AssertPeriphReset(CHIP_SYSCTL_PERIPH_RESET_T periph)
Assert reset for a peripheral.
__IO uint32_t USARTCLKDIV
STATIC INLINE void Chip_SYSCTL_Map(CHIP_SYSCTL_BOOT_MODE_REMAP_T remap)
Re-map interrupt vectors.
CHIP_SYSCTL_BOOT_MODE_REMAP
STATIC INLINE void Chip_SYSCTL_SetSYSTCKCAL(uint32_t sysCalVal)
Set System tick timer calibration value.
LPC11XX System Control block structure.
__IO uint32_t USBPLLCLKSEL
#define SYSCTL_NMISRC_ENABLE
void Chip_SYSCTL_PowerDown(uint32_t powerdownmask)
Power down one or more blocks or peripherals.
STATIC INLINE void Chip_SYSCTL_EnableBODReset(void)
Enable brown-out detection reset.
__IO uint32_t SYSAHBCLKCTRL
__IO uint32_t STARTRSRP0CLR
STATIC INLINE void Chip_SYSCTL_ClearSystemRSTStatus(uint32_t reset)
Clear system reset status.
@ SYSCTL_BODRSTLVL_RESERVED1
STATIC INLINE uint32_t Chip_SYSCTL_GetPORPIOStatus(int index)
Read POR captured PIO status.
__IO uint32_t SYSAHBCLKDIV
__IO uint32_t SYSMEMREMAP
__IO uint32_t SYSPLLCLKUEN
enum CHIP_SYSCTL_BODRSTLVL CHIP_SYSCTL_BODRSTLVL_T
__IO uint32_t USBPLLCLKUEN
ROSCPP_DECL std::string remap(const std::string &name)
void Chip_SYSCTL_SetDeepSleepPD(uint32_t sleepmask)
Setup deep sleep behaviour for power down.
CHIP_SYSCTL_PERIPH_RESET_T
enum CHIP_SYSCTL_BOOT_MODE_REMAP CHIP_SYSCTL_BOOT_MODE_REMAP_T
void Chip_SYSCTL_SetWakeup(uint32_t wakeupmask)
Setup wakeup behaviour from deep sleep.
enum CHIP_SYSCTL_BODRINTVAL CHIP_SYSCTL_BODRINTVAL_T
STATIC INLINE uint32_t Chip_SYSCTL_GetWakeup(void)
Return current wakeup mask.
void Chip_SYSCTL_PowerUp(uint32_t powerupmask)
Power up one or more blocks or peripherals.
STATIC INLINE void Chip_SYSCTL_SetBODLevels(CHIP_SYSCTL_BODRSTLVL_T rstlvl, CHIP_SYSCTL_BODRINTVAL_T intlvl)
Set brown-out detection interrupt and reset levels.