Closed greenscreenflicker closed 8 months ago
Hello, I have the following setup: Systick is running a simple taskcaller, while a control loop is run by a DMA interrupt. The DMA interrupt should always have the higher priority.
main.c: NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
control.c
void control_init(void){ NVIC_InitTypeDef NVIC_InitStructure = {0}; NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel1_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); }
systic.c
void taskcaller_init(void) { NVIC_InitTypeDef NVIC_InitStructure = {0}; NVIC_InitStructure.NVIC_IRQChannel = SysTicK_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); }
However, the systick is not interrupted by the control.
Can you please advise how to get Systick_IRQ priority lower than the DMA priority?
EDIT: I tryed reversing prioritys (lower=higher, same effect). I'm desperate for advice.
Hello, I have the following setup: Systick is running a simple taskcaller, while a control loop is run by a DMA interrupt. The DMA interrupt should always have the higher priority.
main.c:
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
control.c
systic.c
However, the systick is not interrupted by the control.
Can you please advise how to get Systick_IRQ priority lower than the DMA priority?
EDIT: I tryed reversing prioritys (lower=higher, same effect). I'm desperate for advice.