Programming the GPIOs on the CS47L63 Codec to perform specific tasks.

Hey,

So I just finished setting up the hardware codec and I wanted to program these GPIOs to do certain tasks for me.

Specifically, I want the GPIOs 5-8 to be connected to the buttons on the audio DK so I can change the gain settings of the hardware codec or do other stuff like toggling the ANC.

For example, If I press the Button 4, I want the ANC to be toggled. Or If I press the Volume Up or Down buttons, I want to the output gain / volume to be increased / decreased accordingly. 

Or something more simpler as, Pressing Button 4 will shift the output volume register value to 0x00000280 and pressing btn 5 will change it to 0x000002BF.

How can I achieve this?

Parents Reply Children
  • The CS47L63 GPIO are designed mostly for outputs, such as PWM, various clocks, and system status signals.

    They can also detect (and even debounce) button presses, but those input signals can only trigger an interrupt. You'll have to program the onboard DSP peripheral to actually respond to said interrupts, but thus far I cannot find a single resource on how this is done. Cirrus Logic has been absolutely no help.

    See section "4.12 General Purpose I/O" in the datasheet for a few more details.

  • Hi,

    SohamGhugare said:
    Is there a way we can interface buttons directly to the hardware codec? (say on a custom PCB or something) so we can achieve such functionality without the interference of Audio DK?

    If you want to interface buttons from your custom board (no Nordic parts involved) to the hardware codec, you should consult the hardware codec datasheet directly.

    Best regards,
    Dejan

Related