stm32h7disco-i2s-baremetal(in stm32h7-i2s-record-play-wav-master)
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
-
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).
