CAN Bus interrupt on Reception S32k144

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CAN Bus interrupt on Reception S32k144

ソリューションへジャンプ
6,008件の閲覧回数
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 件の賞賛
返信
1 解決策
2,324件の閲覧回数
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 件の賞賛
返信
1 返信
2,325件の閲覧回数
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 件の賞賛
返信