Hi,
I want to get the SPI data register status regarding if they are full or empty.!
Kindly guide me with relevant APIs i can use.
Thanks,
Hi,
I want to get the SPI data register status regarding if they are full or empty.!
Kindly guide me with relevant APIs i can use.
Thanks,
Hello Simon,
Thanks for the info, I am using nCS as in zephyr driver model,
So can I use something specific to zephyr..?
For example in spi_context.h, I noticed APIs like:
bool spi_context_tx_on(struct spi_context *ctx) { return !!(ctx->tx_len); } bool spi_context_rx_on(struct spi_context *ctx) { return !!(ctx->rx_len); } bool spi_context_rx_buf_on(struct spi_context *ctx) { return !!(ctx->rx_buf && ctx->rx_len); }
Is this SPI Context already pointing to RXD.PTR and TXD.PTR for nordic board..?
Can i use above APIs..?
Hello Simonr,
I think my question is not right,
Rather, If i need to get say nordic board SPI tx data address from device binding or device tree, so that i can check if buffer empty or full,
What can I do..?
Kindly suggest
Hi
To check your TX buffer for instance, you will need to use the p_tx_buffer which is the pointer to the TX buffer (or ctx->tx_buf) in the spi_nrfx files in the nRFConnect SDK. YOu then have to read the memory from this pointer to check whether the buffer is empty or filled. I'm afraid there's no specific "buffer status" check in the API.
Best regards,
Simon