cancel
Showing results for 
Search instead for 
Did you mean: 

What do these lines of code do: WM8994 Errata Work-Arounds

Rodo
Senior

Hi all,

I'm using an STM32F746 Disco board. I'm not sure if the code (below) for this codec came from one of the examples for this board or other disco or nucleo board but it is from an STM32 example or board or github.

There are three lines for "WM8994 Errata Work-Arounds". I tried to look for the errata sheet for the WM8994 but I can't find it. The datasheet says not to write to register not shown in the map. The registers being addressed in the "Work-Arounds" are not shown in the map. What do the "Work-Arounds" lines fix or do?

Here is the beginning lines of wm8994_Init:

 

uint32_t wm8994_Init(uint16_t DeviceAddr, uint16_t OutputInputDevice, uint8_t Volume, uint32_t AudioFreq)
{
  uint32_t counter = 0;
  uint16_t output_device = OutputInputDevice & 0xFF;
  uint16_t input_device = OutputInputDevice & 0xFF00;
  uint16_t power_mgnt_reg_1 = 0;
  
  /* Initialize the Control interface of the Audio Codec */
  AUDIO_IO_Init();
  /* wm8994 Errata Work-Arounds */
  counter += CODEC_IO_Write(DeviceAddr, 0x102, 0x0003);   <----- This line
  counter += CODEC_IO_Write(DeviceAddr, 0x817, 0x0000);   <----- this line
  counter += CODEC_IO_Write(DeviceAddr, 0x102, 0x0000);   <----- and this line

 Thanks. 

3 REPLIES 3
KDJEM.1
ST Employee

Hello @Rodo ,

I'll check the functionality of these lines of code.

But, do you encounter any issues when using wm8994.c?

Thank you.

Kaouthar 

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.

Rodo
Senior

Hi @KDJEM.1 ,

I'm just trying to understand the driver code for the WM8994 at this point. 

Thanks

Probably details you'd need to source from Wolfson/Cirrus directly TBH

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..