I'm currently working with the S32K144EVB with Design Studio for ARM. Without the SDK, because I'm new to programming and I want to learn.
I'm trying set prority to several interruptions. It seems that it has no effect : to check it I've used one LPIT to open a popup menu in a console when a button is pushed and waits for an answer for the user (reuse from LPUART example in the coockbook), and another LPIT channel to blink a LED.
Once entered in the first interrupt handler, the second one doesn't occur anymore, i.e. the LED stops blinking.
Extract from the code is :
For the IRQs :
// interrupt for push button
S32_NVIC->ICPR |= 1 << (48 % 32); // IRQ48-LPIT0 ch0: clr any pending IRQ
S32_NVIC->ISER |= 1 << (48 % 32); // IRQ48-LPIT0 ch0: enable IRQ
S32_NVIC->IP = 0xA; // IRQ48-LPIT0 ch0: priority 10 of 0-15
//interrupt for LED blinking
S32_NVIC->ICPR |= 1 << (49 % 32); // IRQ48-LPIT0 ch1: clr any pending IRQ
S32_NVIC->ISER |= 1 << (49 % 32); // IRQ48-LPIT0 ch1: enable IRQ
S32_NVIC->IP = 0x0; // IRQ48-LPIT0 ch1: priority 4 of 0-15
For the handlers :
global_counter++; /* Increment LPIT0 timeout counter */
if ( SW2_PUSHED )
LPIT0->MSR |= LPIT_MSR_TIF0_MASK; // Clear LPIT0 timer flag 0
/PTD->PTOR |= 1<<0; //Toggle output on port D0 (blue LED)
ready = 1;
LPIT0->MSR |= LPIT_MSR_TIF1_MASK; // Clear LPIT0 timer flag 0
Does-anyone know what I'm doing wrong ?