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

Ready interrupt in SPI RAW master (Serialization)

Hi,

I would like to use SPI raw master library (used on application chip in serialization examples) in my own application.

First, to understand well SPI raw implementation and verify signals I set up this configuration :

  • 1 nrf51422 (nRF51-DK board) used as SPI raw master, flash with SPI serialization application chip example “ble_app_hrs_s110_spi_pca10028” (SDK10.0.0)

connected to

  • my own microcontroller used as SPI raw slave

If I understand well SPI raw protocol, the /RDY signal controlled by slave could delay data transmission from master if it is disable during transfer (see figure1 in "SPI RAW protocol" chapter in SDKv10.0.0).

I wonder about this operation because when I try to disable /RDY line (low to high transition on my microcontroller) during master transmission, the master (nrf51422) react at this interrupt only after end of data transfer occured.

This figure shows an example :

The GPIOTE line represents progress (in/out) of the code in "GPIOTE_IRQHandler"

image description

In this case the contribution of the /RDY signal is really poor! (because despite the /RDY signal is disabled master continuous transmission).

  • Is it something that has already been notify by Nordic people or other developers?

  • Why priority level interrupts seem to produce a different working as described in the SDK documentation (see chapter "SPI RAW protocol" in SDK documentation)?

Thanks

Parents
  • Looks like the GPIOTE interrupt is delayed. Both GPIOTE and SPI use interrupt level APP_IRQ_PRIORITY_LOW. You may be doing something in another interrupt (event handler) that is delaying the GPIOTE interrupt? Try changing GPIOTE_CONFIG_IRQ_PRIORITY in nrf_drv_config.h to APP_PRIORITY_HIGH.

    Using nRF as master and another MCU as slave (connectivity chip) is not exactly what the serialization is meant for, it should be the other way around. What is the other MCU and how is the SoftDevice (for connectivity) implemented there. This is not related to your problem, I am just curious.

Reply
  • Looks like the GPIOTE interrupt is delayed. Both GPIOTE and SPI use interrupt level APP_IRQ_PRIORITY_LOW. You may be doing something in another interrupt (event handler) that is delaying the GPIOTE interrupt? Try changing GPIOTE_CONFIG_IRQ_PRIORITY in nrf_drv_config.h to APP_PRIORITY_HIGH.

    Using nRF as master and another MCU as slave (connectivity chip) is not exactly what the serialization is meant for, it should be the other way around. What is the other MCU and how is the SoftDevice (for connectivity) implemented there. This is not related to your problem, I am just curious.

Children
No Data
Related