Skip to main content
Jansunil
Associate III
November 25, 2021
Solved

What does the HAL_SAI_Receive() function take in as the parameter- 'Size'?

  • November 25, 2021
  • 1 reply
  • 889 views

I am trying to use the HAL_SAI_Receive() function from the STMF767xx SAI drivers to receive some data from a device and I would like to know what does the 'Size' parameter actually represent.

My scenario is as follows:

1.) The SAI operates in slave mode

2.) data size in a slot is 8 bits

3.) FS active length (on time of the FS pulse) is 32 bits

4.) Each 4 slots per FS pulse

In the above scenario, would the 'Size' parameter be ? would it be equal to :

(a.)The data size per slot? or would it be (or)

(b.)number of slots*data size per slot? (or)

(c.) something else?

This topic has been closed for replies.
Best answer by TDK

It is the number of data words to receive in units of the datasize you have defined.

In this case, if you want to receive 32 bits and your data size is 8 bits, it should be 4.

1 reply

TDK
TDKBest answer
Super User
November 25, 2021

It is the number of data words to receive in units of the datasize you have defined.

In this case, if you want to receive 32 bits and your data size is 8 bits, it should be 4.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Jansunil
JansunilAuthor
Associate III
November 25, 2021

This is clear. Thank you @TDK​