cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746G-Disco no I2S Output on I2S2 on arduino Header

What I want to achive:

I2S Audio Output on the included Arduino Header of the STM32F746G-Disco Board to drive a MAX98357A class-D amplifier.

PB4 I2S2_WS on Ardunio D3 

PI1 I2S2_CK on Ardunio D7

PI3 I2S2_SD on Arduino D13

To ensure that no configurable solder bridge is missing, I toggled the Pins in GPIO output mode and tested the output with my Logic Analyzer. All 3 pins are toggling as expected.

Then I created the attached CubeMX 6.14.1 *.ioc file to configure the hardware.

I want to use IRQs and DMA fo I2S Audio (48kHz sample rate, 16bit stereo) output in a loop.

I implemented some data buffer and the callback functions (see ateached .c file) and start the initial I2S data transfer with 

HAL_I2S_Transmit_DMA(...);

what I expect to happen next:

a CK signal

a WS signal

some data on the SD signal.

HAL_I2S_TxHalfCpltCallback

a HAL_I2S_TxCpltCallback

What I get:

I2S_TX_Status is OK from initial HAL_I2S_Transmit_DMA(...);

absolute no activity on the I2S lines, just flat lines after reset

The rest of the firmware (LTDC video output is working, some GPIO Input is working and its status is updated on the display) is working as expected.

After fiddling around with the I2S settings (clocks, DMA mode, IT mode, poll mode) and absolutely no change on the I2S lines,

I also created a new empty project just with clocks and I2S2 enabled, witth the same result, just flat lines on the I2S2 lines.

I am clueless how to tackle this issue.

Can someone give me a hint ?

 

Best regards,

Markus.

2 REPLIES 2
GaetanGodart
ST Employee

Hello @markus239955_stm1_stmicro_com ,

 

On each of our TBS we provide debugging pins to check performances.
You can see which one of these pins are set by opening the ream.me file.
In the case of the STM32GF746G_DISCO, this is what we can read:

# STM32F746G_DISCO TBS.

The default IDE is set to STM32CubeIDE, to change IDE open the STM32F746G_DISCO.ioc with STM32CubeMX and select from the supported IDEs (EWARM from version 8.50.9, MDK-ARM, and STM32CubeIDE). Supports flashing of the STM32F746G_DISCO board directly from TouchGFX Designer using GCC and STM32CubeProgrammer.Flashing the board requires STM32CubeProgrammer which can be downloaded from the ST webpage. 

This TBS is configured for 272 x 480 pixels 16bpp screen resolution.  

Performance testing can be done using the GPIO pins designated with the following signals: VSYNC_FREQ  - Pin PB4(D3), RENDER_TIME - Pin PC6(D1), FRAME_RATE  - Pin PC7(D0), MCU_ACTIVE  - Pin PG6(D2)

 It seems we are already using the PB4 pin.

What you can do it to use another pin or to change assign VSYNC_FREQ to another free pin.

To assign VSYNC_FREQ to another pin, open STM32CubeMX and check here:

GaetanGodart_0-1751880683210.png

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Dear Gaetan Godart,

I am not using the default pin configuration, I created a custom *.ioc file, see the attached file in my question.

I also checked the MB1191 design files, BGA pin A9 / PB4 / I2S2_WS is exclusively attached to the arduino header D3 pin:

markus239955_stm1_stmicro_com_0-1751912984158.png

I also do not use TouchGFX, I wrote a custom firmware and graphics library, so there is no test/debug code in my project you are mentioning.

I am not using the onboard TFT:

HDMI_Adapter_V1-1_Back.jpg

I am using a custom Arduino shield to use I2S

HDMI_Adapter_V1-1_Front.jpg

Has anyone else a hint for me to get I2S2 up and running ?

 

Best regards,

Markus.