SAI transmit FIFO pointers

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SAI transmit FIFO pointers

959件の閲覧回数
linasstaisiunas
Contributor I

Again I came back to the FIFO fill level calculations for SAI. If it is not possible to get the tx/rx FIFO fill level so how it is possible to know it? Lets say SSI has got FIFO counter for that purpose. What can you suggest?

Also, could you at least give more brief description about WFP and RFP pointer values in case receive/transmit FIFO is not FULL? Let say receive/transmit FIFO is half full. Do the pointer values differ?

Br,

0 件の賞賛
返信
3 返答(返信)

843件の閲覧回数
Yuri
NXP Employee
NXP Employee

Hello,

   RFP bit field of I2Sx_TFRn shows how much elements have been really transferred

to an external (audio) device, assuming the device reads data from the i.MX6 FIFO.

It is incremented once the data leave the FIFO.

    WFP in a I2Sx_RFR shows how much elements have been really loaded from an external

(audio) device, assuming the device writes data to the i.MX6 FIFO.

It is incremented once the data is put to the receive FIFO.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

843件の閲覧回数
linasstaisiunas
Contributor I

Hi,

Ok. That is clear. Another question related to fifo pointers. For example I got SAI transmit interrupt based on FIFO watermark configuration. This means that there are still left data in a TX FIFO. I want to use I2Sx_TFRn fields RFP and WFP to calculate transmit FIFO free space. Is it the correct way to do it? When in a transmit interrupt I don't want to put too much data to TDR register.

Br,

Linas

0 件の賞賛
返信

843件の閲覧回数
Yuri
NXP Employee
NXP Employee

Hello,

  generally Your approach is possible. Some issue may take place, when FIFO

pointers change during interrupt serving. Therefore it makes sense to work with

fixed (size) block of data, say - half of FIFO to avoid FIFO under / over flow.     

Regards,

Yuri.

0 件の賞賛
返信