Skip to main content
Explorer
September 3, 2025
Solved

STM32H7A3VGT: I2S Master with DMA

  • September 3, 2025
  • 1 reply
  • 247 views

Hi,

I am not able to output per I2S properly.

1. I changed from a properly working driver for STM32F407 to this STM32H7A3VGT

I had to learn, that the master clock is different as for the 407; here is always running (?) and the DMA did not work properly anymore.

2. I made a testsetup with CubeMX (6.14.1):

- I2S Philips
- 48 kS
- 16 bit
- I2S clock = 49,152MHz
- no Masterclock

I simply use HAL_I2S_Transmit() for a 4 word buffer to send. The buffer is 32bit aligned and is in "normal" ram since DTCMRAM does not work for the DMA (lateron).

The function generates proper output for BCK, Data and LRCK, but it never stops. It sends the last word from buffer over and over again. I can switch of i2s, than it stopps. Is this to be expected (?)

3. Next approach:

- Same configuration as (2), but using DMA, Half-Word(16bit) for per and mem, no fifo
- The callback HAL_I2S_TxCpltCallback() is called with the right SPI
-> inside I call HAL_I2S_DMAStop() to stop the DMA

Result: No output at all

4. Next approach:

- Like 3, but no call to HAL_I2S_DMAStop(), DMA is never stopped

Result: same output as (2), the last word is transmitted over and over again.

 

I am dazed and confused. What is happening here ? What might be wrong ?

I simly want to use I2S with DMA, nothing special.

Thank you in advance

 

    This topic has been closed for replies.
    Best answer by Saket_Om

    Hello @Vmanne 

    This is the stop sequence described in the reference manual.

    Saket_Om_0-1756917159693.png

     

    1 reply

    Saket_OmAnswer
    Technical Moderator
    September 3, 2025

    Hello @Vmanne 

    This is the stop sequence described in the reference manual.

    Saket_Om_0-1756917159693.png

     

    VmanneAuthor
    Explorer
    September 3, 2025

    Thank you Saket_Om,

    also I guess, my testszenario is not very practical, since the application would always use a double buffer and a circular dma.

    But I did not read the "stop sequence" topic.

    Regards

    Vmanne