60#ifndef G32R4xx_DDL_CORTEX_H
61#define G32R4xx_DDL_CORTEX_H
91#define DDL_SYSTICK_CLKSOURCE_HCLK_DIV8 0x00000000U
92#define DDL_SYSTICK_CLKSOURCE_HCLK SysTick_CTRL_CLKSOURCE_Msk
100#define DDL_HANDLER_FAULT_USG SCB_SHCSR_USGFAULTENA_Msk
101#define DDL_HANDLER_FAULT_BUS SCB_SHCSR_BUSFAULTENA_Msk
102#define DDL_HANDLER_FAULT_MEM SCB_SHCSR_MEMFAULTENA_Msk
128 return ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == (SysTick_CTRL_COUNTFLAG_Msk));
167 SET_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk);
176 CLEAR_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk);
185 return (READ_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk) == (SysTick_CTRL_TICKINT_Msk));
203 CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk));
213 SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk));
225 SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPONEXIT_Msk));
235 CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPONEXIT_Msk));
246 SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SEVONPEND_Msk));
257 CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SEVONPEND_Msk));
279 SET_BIT(SCB->SHCSR, Fault);
293 CLEAR_BIT(SCB->SHCSR, Fault);
310 return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_IMPLEMENTER_Msk) >> SCB_CPUID_IMPLEMENTER_Pos);
319 return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_VARIANT_Msk) >> SCB_CPUID_VARIANT_Pos);
328 return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_ARCHITECTURE_Msk) >> SCB_CPUID_ARCHITECTURE_Pos);
337 return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_PARTNO_Msk) >> SCB_CPUID_PARTNO_Pos);
346 return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_REVISION_Msk) >> SCB_CPUID_REVISION_Pos);
#define DDL_SYSTICK_CLKSOURCE_HCLK
__STATIC_INLINE void DDL_HANDLER_EnableFault(uint32_t Fault)
Enable a fault in System handler control register (SHCSR).
__STATIC_INLINE void DDL_HANDLER_DisableFault(uint32_t Fault)
Disable a fault in System handler control register (SHCSR).
__STATIC_INLINE void DDL_LPM_EnableEventOnPend(void)
Enabled events and all interrupts, including disabled interrupts, can wakeup the processor.
__STATIC_INLINE void DDL_LPM_EnableSleepOnExit(void)
Configures sleep-on-exit when returning from Handler mode to Thread mode.
__STATIC_INLINE void DDL_LPM_EnableSleep(void)
Processor uses sleep as its low power mode.
__STATIC_INLINE void DDL_LPM_DisableEventOnPend(void)
Only enabled interrupts or events can wakeup the processor, disabled interrupts are excluded.
__STATIC_INLINE void DDL_LPM_DisableSleepOnExit(void)
Do not sleep when returning to Thread mode.
__STATIC_INLINE void DDL_LPM_EnableDeepSleep(void)
Processor uses deep sleep as its low power mode.
__STATIC_INLINE uint32_t DDL_CPUID_GetConstant(void)
Get Constant number.
__STATIC_INLINE uint32_t DDL_CPUID_GetParNo(void)
Get Part number.
__STATIC_INLINE uint32_t DDL_CPUID_GetVariant(void)
Get Variant number (The r value in the rnpn product revision identifier).
__STATIC_INLINE uint32_t DDL_CPUID_GetImplementer(void)
Get Implementer code.
__STATIC_INLINE uint32_t DDL_CPUID_GetRevision(void)
Get Revision number (The p value in the rnpn product revision identifier, indicates patch release).
__STATIC_INLINE void DDL_SYSTICK_SetClkSource(uint32_t Source)
Configures the SysTick clock source.
__STATIC_INLINE void DDL_SYSTICK_DisableIT(void)
Disable SysTick exception request.
__STATIC_INLINE uint32_t DDL_SYSTICK_IsActiveCounterFlag(void)
This function checks if the Systick counter flag is active or not.
__STATIC_INLINE void DDL_SYSTICK_EnableIT(void)
Enable SysTick exception request.
__STATIC_INLINE uint32_t DDL_SYSTICK_GetClkSource(void)
Get the SysTick clock source.
__STATIC_INLINE uint32_t DDL_SYSTICK_IsEnabledIT(void)
Checks if the SYSTICK interrupt is enabled or disabled.