Hello, everyone.
I would like to implement ping-pong operation using three buffers for I2S transmission and reception on the RT595 (as described in Application Note AN12749).
In this case, is there a way to determine which receive block is ready to be read or which transmit block is ready to be written to?
Are there registers or functions provided for this purpose?
Best regards
Hello @adc_6_6,
There isn't any register that provides the information to know which buffer is ready to be read or ready to be written.
This because the structure of ping pong is created by software. Also, the SDK (version 2.15) does not provide examples about ping pong buffer. However, in the same SDK version there is an example called "i2s_interrupt_record_playback" when the unique buffer configured is filled or were read, the code uses a callback to notify the user.
The callback is in the ISR and the code is how shows in the next image:
Sorry for the inconvenience this may cause.
BR,
Habib.