Skip to main content
Visitor II
October 17, 2024
Solved

stm32h7disco-i2s-baremetal(in stm32h7-i2s-record-play-wav-master)

  • October 17, 2024
  • 2 replies
  • 1835 views

I try for the first time to use audio , on my stm32h747i-DISCO board.

I have 2 questions

1) the build CM7 is showing the following error

Description Resource Path Location Type

'Mode' undeclared (first use in this function) stm32h7xx_hal_msp.c /stm32h7disco-i2s-baremetal_CM7/Core/Src line 179 C/C++ Problem

in

/* USER CODE END I2S1_Init 1 */

hi2s1.State = HAL_I2S_STATE_RESET;

hi2s1.Instance = SPI1;

hi2s1.Init.Mode = Mode;

hi2s1.Init.Standard = I2S_STANDARD_PHILIPS;

hi2s1.Init.DataFormat = I2S_DATAFORMAT_16B_EXTENDED;

hi2s1.Init.MCLKOutput = I2S_MCLKOUTPUT_DISABLE;

hi2s1.Init.AudioFreq = I2S_AUDIOFREQ_11K;

hi2s1.Init.CPOL = I2S_CPOL_LOW;

hi2s1.Init.FirstBit = I2S_FIRSTBIT_MSB;

hi2s1.Init.WSInversion = I2S_WS_INVERSION_DISABLE;

hi2s1.Init.Data24BitAlignment = I2S_DATA_24BIT_ALIGNMENT_RIGHT;

hi2s1.Init.MasterKeepIOState = I2S_MASTER_KEEP_IO_STATE_DISABLE;

if (HAL_I2S_Init(&hi2s1, Mode) != HAL_OK) //This Mode is the error

{

Error_Handler();

}

/* USER CODE BEGIN I2S1_Init 2 */

/* USER CODE END I2S1_Init 2 */

}

Even after regenerating the code, the error is still here

 

  1. I imagine the input is Jack microphone aud the output is Jack speaker.

The notice says I2S pins

- PA4: i2s1_ws

- PA6: i2s1_sdi :Digital pin5 of the arduino connector below the Disco Module.

- PB3: i2s1_ck

- PD7: i2s1_sdo I am not usual of I2S, may be the output is I2S1_SDO pin (But, I don't see any access to this pin).



    This topic has been closed for replies.
    Best answer by Peter BENSCH

    You are probably referring to Github project of gokmez?

    Have you already contacted him and asked him about it?

    Regards
    /Peter

    2 replies

    Technical Moderator
    October 17, 2024

    You are probably referring to Github project of gokmez?

    Have you already contacted him and asked him about it?

    Regards
    /Peter

    BRobe.3Author
    Visitor II
    October 17, 2024

    Thanks for your answer. Yes it is https://github.com/gokmez/stm32h7-i2s-record-play-wav.

    I will try contact him

    Best regards

    Technical Moderator
    October 17, 2024

    Hello @BRobe.3 ,


    @BRobe.3 wrote:

    I try for the first time to use audio , on my stm32h747i-DISCO board.


    Which Demo? you need always to provide details from the beginning to prevent confusions ..

    Also, please use </> button to share your code. Refer to the tips on how to post a thread.

    Thank you.

    BRobe.3Author
    Visitor II
    October 17, 2024

    Thanks for your answer

    It is : https://github.com/gokmez/stm32h7-i2s-record-play-wav for   stm32h747i-DISCO board.

    Best Regards