How to request a irq for s32v?

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

How to request a irq for s32v?

1,145件の閲覧回数
huangzhong
Contributor II

I have problem in requesting a irq for s32v, I don't konw the first parameter in s32v should be, for example I want to set the PA0 port to be a irq function, and I user the following code:

   volatile struct SIUL2_tag *Siul2_Reg = NULL;
   Siul2_Reg = ioremap((uintptr_t)&SIUL2, sizeof(struct SIUL2_tag));

   //PA0 irq
   Siul2_Reg->MSCR[590].B.MUX_MODE = 2; // interrupt mux mode selected

   // PA0 (the pad is )

   ret = request_irq(???, PA0_interrupt_handle, IRQF_TRIGGER_FALLING, "PA0_IRQ", NULL);
   if(ret)
   {
      printk("request_irq failed!\n");
      return -1;
   } 

11.jpg

   the "???" should be? could you tell me how to fill it in a simple case.

         Look forward to your answer , thank you very much!

ラベル(1)
0 件の賞賛
2 返答(返信)

923件の閲覧回数
cezardobromir
NXP Employee
NXP Employee

Hi,

That number that you have shown in the picture is actually the IMCR number.

If you look into the RM at the SIUL2 module you will see that the MSCR registers take values from 0 to 309.

The IMCR registers have values from 0 to 511 but to use them from the IO_Signal_Description table you need to subtract 512 from the values that are grater than 511.

So, for your example you should write in IMCR[79] in the DAISY field.

Best regards,

Cezar

0 件の賞賛

923件の閲覧回数
stanish
NXP Employee
NXP Employee

Hi,

Could you please indicate:

* which version of the tool are you using (e.g. S32DS ARM 2.0?)

* SDK version

Thank you

Stan

0 件の賞賛