Question
stm32F4Discovery audio codec problem
Posted on July 19, 2012 at 17:20
Hi, I'm trying to play audio from flash, using your stm32f4_discovery_audio_codec andaudio_sample.c from project examples that comes with this board.
Here is my codeint main(void)
{
HardwareInit();
/*
xTaskCreate( vTaskLED1, ( signed char * ) ''LED1'', configMINIMAL_STACK_SIZE, NULL, 2,
( xTaskHandle * ) NULL);
*/
xTaskCreate( vTaskLED2, ( signed char * ) ''LED2'', configMINIMAL_STACK_SIZE, NULL, 2,
( xTaskHandle * ) NULL);
// GPIO_SetBits(GPIOD, GPIO_Pin_12 | GPIO_Pin_13);
EVAL_AUDIO_Play((uint16_t*)((uint16_t*) (&AUDIO_SAMPLE+58)), 990000-58);
vTaskStartScheduler();
for (;;);
} I've taken audio sample from expample and changed it's to header file, otherwise it CoIDE couldn't compile it.
EVAL_AUDIO_SetAudioInterface(AUDIO_INTERFACE_I2S);
if (EVAL_AUDIO_Init(OUTPUT_DEVICE_AUTO, 50, 8000) == 0) {
GPIO_SetBits(GPIOD, GPIO_Pin_12);
} This what I am doing in HardwareInit(); function.
Green led is lightning (which means that codec initialization became without errors), but I don't hear anything in my headphones.
Example project is working though.
Please, help me.
#me-too