Audio DK "beep" sample

Can anyone please point me in the direction of sample code for the nRF5340 Audio DK that demonstrates a simple beep.

I'm not yet interested in multiple threads, or huge DMA transfers, or the ridiculously behemoth Bluetooth sample application. Just a single beep using the onboard DAC.

I've already scoured the nRF SDK docs, and searched Github for every keyword I can think of, but can find absolutely nothing to bootstrap my self edification.

It's incredibly frustrating to have invested so much money in the hardware and the insane amount of time sunk studying Zephyr, only to be met with a complete lack of resources for the most basic functionality of an ostensible "Audio DK".

I'm more than capable of extrapolating from a working sample, but cannot even find a toehold. Any and all suggestions are welcome.

Parents
  • I eventually figured it out; here's the guidance I wish someone had shared with me...

    /modules/hal/cirrus-logic/cs47l63 contains the codec driver and its essential support functions defined in the various files from those subdirectories.

    /nrf/applications/nrf5340_audio/src/drivers/cs47l63_comm.c implements the driver communication in Zephyr using threads, mutexes, and semaphores for the SPI connection, interrupts, and callbacks.

    /nrf/applications/nrf5340_audio/src/drivers/cs47l63_reg_conf.h contains all the necessary register data to setup and enable the sundry codec subsystems such as clocks, gpios, analog/digital inputs, I2S serial ports, headphone output, and the internal signal routing required for the nRF5340 Audio DK. The CS47L63 datasheet describes these in detail.

    /nrf/applications/nrf5340_audio/src/modules/hw_codec.c demonstrates how to combine all these disparate files into working code that can be integrated within a larger multithreaded application using features such as ZBus, Shell, and KConfig options.

    Once all that infrastructure is in place, simply send data to the &i2s0 peripheral and it will be rendered by the codec's DAC output. Or, alternatively, modify the codec's internal routing so that its built-in test tone or white noise generators are sent to the DAC output instead.

Reply
  • I eventually figured it out; here's the guidance I wish someone had shared with me...

    /modules/hal/cirrus-logic/cs47l63 contains the codec driver and its essential support functions defined in the various files from those subdirectories.

    /nrf/applications/nrf5340_audio/src/drivers/cs47l63_comm.c implements the driver communication in Zephyr using threads, mutexes, and semaphores for the SPI connection, interrupts, and callbacks.

    /nrf/applications/nrf5340_audio/src/drivers/cs47l63_reg_conf.h contains all the necessary register data to setup and enable the sundry codec subsystems such as clocks, gpios, analog/digital inputs, I2S serial ports, headphone output, and the internal signal routing required for the nRF5340 Audio DK. The CS47L63 datasheet describes these in detail.

    /nrf/applications/nrf5340_audio/src/modules/hw_codec.c demonstrates how to combine all these disparate files into working code that can be integrated within a larger multithreaded application using features such as ZBus, Shell, and KConfig options.

    Once all that infrastructure is in place, simply send data to the &i2s0 peripheral and it will be rendered by the codec's DAC output. Or, alternatively, modify the codec's internal routing so that its built-in test tone or white noise generators are sent to the DAC output instead.

Children
No Data
Related