2017-06-06 10:48 AM
Hello.
I use STM32CubeMX for programming of a STM32F407 Discovery board.
I want to play a sound using audio codec.
Unfortunately I can't communicate with codec by I2C and I2S.
There is no any sound in headphone.
Is there any simple example for Audio Playing in
STM32CubeMX without using DMA or Interrupt or USB?
Maybe using a MEMS Mic?
#audio-playing-in-stm32cubemx2017-06-07 05:37 AM
Hi
Pourmohammad.Ali
,There is no examples available with STM32CubeMx, wehave
the Audio example but with DMA or interrupt within/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fen%2Fembedded-software%2Fstm32cubef4.html
firmware package available at this path:STM32Cube_FW_F4_V1.0\Projects\STM32F4-Discovery\Applications\Audio\Audio_playback_and_record
Hopecommunity' users will helpyou with working example.
Regards
Imen
2017-06-07 09:26 AM
Dear Imen, Hello.
Thanks a lot for your help.I tried that example but I couldn't communicate with the codec.First I want to communicate with the codec.I use STM32CubeMX compiler and Hal drivers.I activated I2S3 and I2C1 then tried to read the ID register of the codec but it didn't work.I tried it using two different STM32F407 discovery board.May you guide me how can I read the ID register first?
Best RegardsAli Pourmohammad
2017-06-07 09:28 AM
Dear Imwn,
How can I use Audio_playback_and_record example in STM32CubeMX compiler?
Best RegardsAli
2017-06-08 08:05 AM
Hi,
The Audio_playback_and_record example is not to use with STM32CubeMx.
It is a working example to runwith your tool chain as (EWARM, MDK-ARM, SW4STM32, TrueSTUDIO)2017-06-08 12:14 PM
Dear Imen,
I read the codec and Hal_Drivers datasheets completely.I wrote a function to initialize the codec first, and play a sound later without using DMA and any interrupt.But it couldn't communicate with the codec.I only need a simple and short example to communicate with the codec in STM32CubeMX 4.13.0 compiler.For example reading the ID register of the codec.
Best RegardsAli Pourmohammad