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,
Hi
By register status, do you mean the SPI buffer? I would suggest checking out the SPI peripheral driver's API here.
Best regards,
Simon
Hello Simon,
Yep to check buffer status like TX/RX Data Reg is Full or empty.
I couldn't find any APIs that i can use to check the buffer status, hence the query
Kindly help me understand
Hi
Sorry, there aren't APIs specifically for this, but the SPI peripheral has a STATUS register you can read to check the status of the last transaction for example.
Best regards,
Simon
Hello Simon,
I kind of was figuring that out, on usage of SPI context structure to read the TX/RX registers/buffer status.
can you kindly point me on how i can use the same..?
Thanks,
Hi
The SPI slave peripheral for instance uses two memory pointers RXD.PTR and TXD.PTR, that point to the RXD buffer and TXD buffer respectively. Since these buffers are located in RAM, it can be accessed by both the SPI slave and the CPU.
I'm afraid we don't have a specific code example doing this already, but you should be able to implement it by referring to the SPI slave operation description and registers in the product specification.
Best regards
Simon