Does I2S_WriteByte() block?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

How can I detect I2S_WriteByte() over ?

   

I need write a lot data to I2S interface at a speical speed. how can i realize it ?

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The datasheet is quite clear about that:

   

Description: This macro writes a single byte into the Tx FIFO for the specified stereo channel. You have
to check the Tx status before this call to confirm that the Tx FIFO is not full.

   

Furthermore read about I2S_ReadTxStatus() and the declaration of the status bits.

   

You can write to I2S using the interrupt for FIFO not full (level) and feed your interface until the FIFO is filled.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you. but there is a I2S_WriteByte() and I2S_ReadByte. how can i write or read a 16 bits data on special channel?

   

what does interleaved mean?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

From datasheet:

   

Data interleaving
This parameter is used to select whether the data is Interleaved (default) or Separate L/R. Rx
and Tx are selected independently. When the Interleaved option is selected, the left and right
channels are interleaved with a sample for the left channel first, followed by the right channel in a
single FIFO (FIFO 0). In Separate L/R is selected, the left and right channel byte streams use
separate FIFOs: FIFO 0 and FIFO 1. Each FIFO has 4-byte depths.

   

16 bit values are red and written as separate 8 bit units that you combine/separate yourself to/from 16 bit units.

   

 

   

Bob

0 Likes