cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jansunil
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

2 REPLIES 2
TDK
Guru

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".

This is clear. Thank you @TDK​