NRFX SPIM and Zephyr SPI

I have an application where I need to trigger time critical SPI reads of accelerometer data (sample rate is very crucial and data is fed into a FFT). In my current SDK based application I use PPI timer events to trigger SPI reads. Currently we are required to migrate over to NCS. In the new application, we also require logging data to the NOR Flash filesystem (LittleFS). To get my platform started for test, my application currently uses the Zephyr SPI driver to work with the accelerometer. Everything is working 100%. I am now switching it over to the NRFX driver to be able to use PPI timer events to trigger SPI reads. Now I'm having (yes, I expected this) interrupt issues due to CONFIG_SPI=y and CONFIG_NRFX_SPIM1=y. I have a few questions: 

  1. Is there a way to allow using NRFX for SPI1 and at the same time use the Zephyr SPI driver for SPI2 (used for external flash)? 
  2. Ideal: Is there a way to still trigger a SPI task and generate SPI end events when using the Zephyr driver? Does enabling the kconfig option CONFIG_SPI_NRFX=y allow for this? Does that enable the NRFX API to work under the hood and coexist with the Zephyr driver?
  3. Is there another solution that would allow precise SPI data reads? As per the requirements. jitter is unacceptable. 

Thanks

Parents Reply Children
No Data
Related