cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7A3VGT: I2S Master with DMA

Vmanne
Associate II

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Saket_Om
ST Employee

Hello @Vmanne 

This is the stop sequence described in the reference manual.

Saket_Om_0-1756917159693.png

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om

View solution in original post

2 REPLIES 2
Saket_Om
ST Employee

Hello @Vmanne 

This is the stop sequence described in the reference manual.

Saket_Om_0-1756917159693.png

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om

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