cancel
Showing results for 
Search instead for 
Did you mean: 

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

BRobe.3
Associate III

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).



1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

You are probably referring to Github project of gokmez?

Have you already contacted him and asked him about it?

Regards
/Peter

In order 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.

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

You are probably referring to Github project of gokmez?

Have you already contacted him and asked him about it?

Regards
/Peter

In order 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.
SofLit
ST Employee

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.

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.

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

I will try contact him

Best regards

Thanks for your answer

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

Best Regards

 

Hello Peter,

Unfortunatly, I didn't find any way to contact Mr Gokmez.

Do you have a contact ? It would be great to find a solution as it is the only sound example for the stm32h7disco board.

Best Regards

Gokmez is one of millions of users of the STM32 MCUs. I could also just try to reach him via GitHub, as I also only found the repository with my favourite search engine.

In order 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.