HAL (SPI DMA) check how many bytes received during operation

Thread Starter

Aashram

Joined Nov 17, 2014
10
I am transferring 10 bytes from master to slave over SPI+DMA.
How can I check whether how many bytes the receiver has at that moment and if all the 10 byte has not been received then stops the process.
Because the master after sending 10 bytes should get an answer from slave but if the slave has not received full byte it waits and system go in indifinite.......
Checking the receiver for how many bytes it received??
Does HAL has any function to do that??
Or is there any register which can accomplice this process??

Any idea??
 

Papabravo

Joined Feb 24, 2006
12,774
SPI uses an exchange of data. As each byte is sent, the received byte is returned at the same time. You send one and you get one. They may not be correct or meaningful, but they are there. I have no idea what HAL is, except the mainfraime computer from the move "2001, A Space Odyssey"
 
Top