10 Replies Latest reply on Oct 4, 2020 11:24 PM by RodolfoG_11

    PSoC 6 HAL I2S circular buffer implementation with DMA freeRTOS

    ArMu_4673571

      Dear all,

       

      I'm trying to make an implementation of a circular buffer with the I2S peripheral to read some data with the RX lines, processing it, and then write it on the TX line. I'm using freeRTOS and currently have two tasks. On the first one I'm making the basic app configuration and in the second one "audio_stream.c" I'm making the implementation of the circular buffer. This implementation is based on the I2S example of the HAL library (snippet 3 and 4). But for some reason I can't get it working. What I've verified until now is:

       

      - I2S clocks are correctly configured and initialized (verified with a scope)

      - I2S block can initialize properly (init function returning success)

      - The system is correctly entering in the audio stream task (verified with debugging) and (on purpose) remains there.

      - We have data coming to the RX line.

      - MCU used is CY8C62ABZI-S2D44

      - If line 85 is used (cyhal_i2s_set_async_mode) TX remains always low. If commented (not used) is transmitting data but apparently it is just noise (verified with audio precision i2s receiver, we are also verifying the RX data line and seems ok, trying a sine wave).

       

      Could you please help checking the implementation?

       

      Best regards,

      Ariel