Using nRF5340-DK, nRF Connect for VS Code 2026.1, ncs v3.1.1
I'm interfacing over a SPI bus to a custom ASIC that uses MISO as a sort of RTS/CTS kind of idea. While CS is active the ASIC raises the MISO line asynchronously with SCLK to indicate it has received the command. The ASIC lowers the MISO line asynchronously when it has the result ready to be read. Then the microcontroller finishes the SPI transaction and de-asserts CS.
So, my firmware needs to do this:
1. Assert CS
2. Send several bytes that form the command
3. Wait for asynchronous MISO high to low transition
4. Send dummy bytes to clock in the response
5. De-assert CS
I'm using spi4 as defined in the default device tree. CS is a GPIO controlled by my firmware (as set up in the spi_config struct).
The SPI bus is working to read/write individual registers in the typical way using this Zephyr function: spi_transceive(spec->bus, &spec->config, tx_bufs, rx_bufs);
How can I access MISO as a GPIO to accomplish step 3?
Thanks,
Dan