This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

recommendation for interrupt priority between SPI and GPIOTE

Hi All,

Just want to ask if there is a better or recommended way to manage priority interrupt.

My application uses 3 interfaces:

  1. SPI as master to interact with ADC(codes from SPI example SDK 12.2.0).
  2. 2x GPIOTE pins as interrupt from the ADC(codes from pin_change_interrupt example).
  3. 1x PWM channel generating 32 KHz clock.

From the example, both SPI and GPIOTE use priority interrupt 7; and my GPIOTE interrupt handler routine does make use of SPI access to the ADC(so after GPIOTE interrupt, the SPI to ADC won't work anymore).

It seems, the easiest solution would be to change the SPI interrupt priority from 7 to 6 ?

Just wondering if there is a better/prefer way to handle the above situation.

The 2nd. issue is related to the 2x GPIOTE pins; both can generate interrupt; what is the best way to handle this assuming both can generate interrupt "at the same time"; at the moment, I wire both interrupts to go to the same interrupt handler; will this interrupt handler be called twice if both interrupts are occurring not exactly at the same time ?

I set the 2x GPIOTE pins to generate interrupt with "high to low" signal transition.

Thanks for the help.

Lee

Parents Reply Children
No Data
Related