ARM Cortex-M0/M3 Core peripheral (CPU, NVIC, Systick). More...
|
Modules | |
| xCORE API | |
Cortex-M0/M3 Core peripheral(CPU, NVIC, Systick) API reference. | |
| NVIC Register | |
Here are the details info of NVIC registers. | |
Defines | |
| #define | xINT_PRIORITY_MASK |
| Macro to generate an interrupt priority mask based on the number of bits of priority supported by the hardware. | |
ARM Cortex-M0/M3 Core peripheral (CPU, NVIC, Systick).
The core driver will access Special register As following:
The specified interrupt is enabled in the interrupt controller. Other enables for the interrupt (such as at the peripheral level) are unaffected by this function.
The specified interrupt is disabled in the interrupt controller. Other disables for the interrupt (such as at the peripheral level) are unaffected by this function.
If the pend is set,The specified interrupt is pended in the interrupt controller. This will cause the interrupt controller to execute the corresponding interrupt handler at the next available time, based on the current interrupt state priorities. For example, if called by a higher priority interrupt handler, the specified interrupt handler will not be called until after the current interrupt handler has completed execution. The interrupt must have been enabled for it to be called.
If the pend is clear,The specified interrupt is unpended in the interrupt controller. This will cause any previously generated interrupts that have not been handled yet (due to higher priority interrupts or the interrupt no having been enabled yet) to be discarded.
When multiple interrupts are asserted simultaneously, the ones with the highest priority are processed before the lower priority interrupts. Smaller numbers correspond to higher interrupt priorities; priority 0 is the highest interrupt priority.
The hardware priority mechanism will only look at the upper N bits of the priority level (where N is 2 for the NUC1xx family), so any prioritization must be performed in those bits. The remaining bits can be used to sub-prioritize the interrupt sources, and may be used by the hardware priority mechanism on a future part. This arrangement allows priorities to migrate to different NVIC implementations without changing the gross prioritization of the interrupts.
NVIC can also split between preemptable priority levels and subpriority levels in the interrupt priority specification. The range of the grouping values are dependent upon the hardware implementation; on the NUC1xx family, Cortex -M0 as it is ,do not support it.
SysTick provides a simple, 24-bit clear-on-write, decrementing, wrap-on-zero counter with a flexible control mechanism. The counter can be used as a Real Time Operating System (RTOS) tick timer or as a simple counter.
When system timer is enabled, it will count down from the value in the SysTick Current Value Register (SYST_CVR) to zero, and reload (wrap) to the value in the SysTick Reload Value Register (SYST_RVR) on the next clock cycle, then decrement on subsequent clocks. When the counter transitions to zero, the COUNTFLAG status bit is set. The COUNTFLAG bit clears on reads.
The CoX Core API is broken into 3 groups of functions:
CPSID/CSPIE instruction:
BASEPRI read/write with:
WFI instruction:
PSP read/write with:
MSP read/write with:
Interrupt enable/disable by:
The interrupt priority is deal with:
The interrupt can be pending with:
The Systick is enable/disable with:
The Systick interrupt is enable/disable with:
The Systick is controled by:
Add in the fulture...