nRF5340: Debugging SPI + Implementing SPI + PPI

Hello,

I have a question regarding 1. debugging SPI and 2. implementing SPI + PPI + FORK. It would be really appreciated if anyone could help me with this. 

Debugging SPI

In order to connect SPI and PPI, I need to use nrfx library. I have a working example that is using zephyr library. There is a sample from devZone that is using nrfx library. I made an adjustment (SCK, MISO, MOSI, CS pins) but seems like it's not working.

-- In zephyr +overlay version, I could set those pins to "gpio1" and pin 4,5,6,7 in overlay. But in nrfx version, I could only set pin numbers to 4,5,6,7. Is there any way I could set it to gpio1 specifically?

-- Since I would like to do "read" operation, I am checking "m_rx_buf" in nrfx version. But the buffer is always filled with 0. With zephyr version, I can read the number I expect.

Please let me know if there is anything I am missing. 

Implementing SPI + PPI + FORK

I found in order to connect SPI and PPI, I need to set NRFX_SPIM_FLAG_HOLD_XFER flag for SPI and configure CS to  NRFX_SPIM_PIN_NOT_USED and manage it outside the driver. This suggests using fork. Is there any example code I can follow for this? 

Thank you,

Related