cancel
Showing results for 
Search instead for 
Did you mean: 

Simple use of WM8994 AUDIO CODEC on STM32H750-DISCO board

Mdi c
Associate III

Dear all,

I would like to generate some very simple sounds using the WM8994 audio codec on the stm32h750 discovery board. I have seen the examples from the stm32Cube repository as well as some examples from C. Noviello. Unfortunately, I am struggling finding a way to make it work. Could you please redirect to towards the right approach to achieve this goal?

Thank you very much in advance.

Mat

3 REPLIES 3
Piranha
Chief II

You have to be more specific on what you're struggling.

This is the problem with CubeMX clicking - you spend a time on it, but ultimately you are still unable of developing anything non-trivial on your own. My advice is to learn real development:

https://www.embeddedrelated.com/showarticle/453.php

Mdi c
Associate III

Sorry @Piranha​ , but this is a pretty useless answer. A good answer would be, check the configuration on the WM8994 datsheet (which is probably the most verbose datasheet on earth), initialize the SAI interface parameters, use the callbacks half/full to fill the DMA buffer etc. Anyway thanks!

Your initial post indeed sounded like so many we see here, "I've clicked this [complex interface] in CubeMX and it does not work", expecting some simple magic to get "it" working.

So, as you already know it's about divide et impera, and that the codec in question is probably the most complex beast in its cathegory,

- the best would be to observe the given I2S (SAI) pins with oscope or LA. This may be hard to impossible on the denser devboards (thanks, ST, for not bringing out the MCU pins at least to test points)

- if there is no or incorrect activity there (or you can't measure it), read it and check the related GPIO registers, RCC registerd for the expected SAI clocking, SAI registers, DMA registers (where you should see NDTR changing)

- if you are sure the I2S part is OK, investigate the control channel (I2C? I didn't check) - again, best by observing using LA, or even perhaps reading back some parameter.

JW