SPI issue

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

SPI issue

Contributor I


when I use the spi  read a angle sensor data,   there are some issues need your help.

when I read the angle every 1ms, it can work correctly, but when I read the angle every 100us in the CTU FIFO1 ISR, it cant' work correctly, the ISR runing time over 100us. 

the SPI implement time over more than 100us, but my SPI baud rate is 5M.  

I suspect that, the interrupt nestting lead the error.  

I want to use the blocking way for the transfer , but I fount the SDK actually use the non-blockig interrupt for the transfer,   becuase I use the angle for motor control, so the 100us CTU ISR is very high prority.  


0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport


blocking function still uses module interrupts, it just do not leave function until transfer is finished or timeout happens. It does not disable other interrupts so if higher interrupt priority happens during transfer a time that driver spends within blocking function can be extended.
You can change interrupt priorities, but it depends on application.

BR, Petr

0 Kudos