2025-05-08 1:07 AM - last edited on 2025-05-08 1:08 AM by Andrew Neil
Hello,
i have configured a timer interrupt an it seems like that interrupt preempt another adc interrupt.
I configured the timer interrupt like that:
2025-05-08 6:06 AM
> i have configured a timer interrupt an it seems like that interrupt preempt another adc interrupt.
Why does it seem like that?
Expect some jitter in the interrupt with priority group 0. The default (group 4) allows higher priority interrupts to pre-empt lower priority ones.
With priority group 0, no interrupt can pre-empt each other.
/** @defgroup CORTEX_Preemption_Priority_Group CORTEX Preemption Priority Group
* @{
*/
#define NVIC_PRIORITYGROUP_0 ((uint32_t)0x00000007) /*!< 0 bits for pre-emption priority
4 bits for subpriority */
#define NVIC_PRIORITYGROUP_1 ((uint32_t)0x00000006) /*!< 1 bits for pre-emption priority
3 bits for subpriority */
#define NVIC_PRIORITYGROUP_2 ((uint32_t)0x00000005) /*!< 2 bits for pre-emption priority
2 bits for subpriority */
#define NVIC_PRIORITYGROUP_3 ((uint32_t)0x00000004) /*!< 3 bits for pre-emption priority
1 bits for subpriority */
#define NVIC_PRIORITYGROUP_4 ((uint32_t)0x00000003) /*!< 4 bits for pre-emption priority
0 bits for subpriority */