NRF Connect SPIS Interrupt

I am wondering if someone can help point me to a repo that explains how to create a gpio interrupt that can detect when my CS line goes from High to Low and jump to a method when detected?

  • Hi,

    The SPIS peripheral "owns" the CS pin, so it cannot be used as a normal GPIO input and generate an interrupt while used for SPIS. However, refering to the SPIS specification, you may be able to use the ACQUIRED event ("The SPI slave will try to acquire the semaphore when CSN goes low"). This is used by the driver as you can see in nrfx_spis.c. If you use the driver and do not want to modify it, a non-intrusive way to get an interrupt could be to connect the ACQUIRED event to the EGU via PPI.

    Another more straight-forward alternative could be to connect teh CS line to another GPIO, and configure that as an input for which you enable interrupts.

Related