CAN Bus interrupt on Reception S32k144

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAN Bus interrupt on Reception S32k144

Jump to solution
5,552 Views
manuelmoreno-eg
Contributor II

Hi,

I am trying to enable interrupts on CAN reception (S32k144 EVB) with the folowing code:

void NVIC_init_IRQs (void) {
  S32_NVIC->ICPR[1] = 1 << (CAN0_ORed_0_15_MB_IRQn % 32);  /* IRQ81 CAN0 channel: clear any pending IRQ */
  S32_NVIC->ISER[1] = 1 << (CAN0_ORed_0_15_MB_IRQn % 32);  /* IRQ81 CAN0 channel: enable IRQ */
  S32_NVIC->IP[CAN0_ORed_0_15_MB_IRQn] = 0xA0;             /* IRQ81 CAN0 channel: priority 10 of 0-15 */
}

However, I cannot get any interrupt.

Where can I find documentation about the vectors S32_NVIC?

Thanks a lot,

Manuel

0 Kudos
1 Solution
1,868 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Manuel,

S32K1xx_DMA_Interrupt_mapping.xlsm

pastedImage_1.png

So please write to ICPR[2], ISER[2].

  S32_NVIC->ICPR[2] = 1 << (CAN0_ORed_0_15_MB_IRQn % 32);  /* IRQ81 CAN0 channel: clear any pending IRQ */
  S32_NVIC->ISER[2] = 1 << (CAN0_ORed_0_15_MB_IRQn % 32);  /* IRQ81 CAN0 channel: enable IRQ */

Regards,

Daniel

View solution in original post

0 Kudos
1 Reply
1,869 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Manuel,

S32K1xx_DMA_Interrupt_mapping.xlsm

pastedImage_1.png

So please write to ICPR[2], ISER[2].

  S32_NVIC->ICPR[2] = 1 << (CAN0_ORed_0_15_MB_IRQn % 32);  /* IRQ81 CAN0 channel: clear any pending IRQ */
  S32_NVIC->ISER[2] = 1 << (CAN0_ORed_0_15_MB_IRQn % 32);  /* IRQ81 CAN0 channel: enable IRQ */

Regards,

Daniel

0 Kudos