Skip to main content
Graduate II
January 27, 2024
Question

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

  • January 27, 2024
  • 2 replies
  • 1452 views

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. 

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    January 30, 2024

    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 

    RodoAuthor
    Graduate II
    January 30, 2024

    Hi @KDJEM.1 ,

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

    Thanks

    Graduate II
    January 30, 2024

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