Just found this now and it looks like something I might need.
I want to write to a serial DAC repeatedly and I don't want my program to wait for the transfer to complete, I want to just start the send and have the program carry on while the data is sent.
As I understand it the default SPI Write function normally waits for the port to be writable, sends a word then loops waiting for a received word. I looked in spi_api to find this.
Now If I write one dummy word to the DR at program start then that will leave one extra word of data in the "pipe" so I think the standard SPI Write function will return immediately instead of waiting as it will find and return the result of the previous transfer.
Looks like I may need to do some benchmarking though.
Just tried it with deliberately slow SPI, slowed it down so it took 100us then followed it with a 100us delay so the total time is 200us.
If I stuff a word beforehand it returns immediately then the transfer and delay run concurrently and program execution time is halved.
Hi, I've noticed a pause of 1µs between SPI blocks (frames?). Is this because the SPI is in frame mode or does the send command do something there? If it is in frame mode, how can I switch to normal mode?
Thanks in adance, René