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
No Data
Reply
  • Wrong strategy. The Audio DK buttons are connected directly to the nRF5340 GPIO, not the CS47L63; the codec cannot see them. You'll need to detect button presses on the nRF5340, then write your desired register values to the CS47L63.

    Nordic's nrf5340_audio application uses ZBus to accomplish this, which complicates its study, but any button handling routine will suffice. Once you've detected a button press, simply call an appropriate function to write the registers. See hw_codec.c for some volume examples.

Children
Related