How to request a irq for s32v?

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

How to request a irq for s32v?

1,144 Views
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!

Labels (1)
0 Kudos
2 Replies

922 Views
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 Kudos

922 Views
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 Kudos