How to modify audio out code for ADSP-BF706 EZ-KIT

Hi, everyone.

I am trying to run the code (Audio_Filter_v4) on the link below with ADSP-BF706 EZ-KIT mini.

https://ez.analog.com/dsp/blackfin-processors/bf70x/f/discussions/12899/simple-audio-in-out-code-for-the-adsp-bf706-ez-kit

The above code executes "in-out" but I only want to "play" using pcm data.

The pcm data I have is 16bit, mono, 48khz.

After setting sport and dma as below, and using tx isr, it succeeded in making sound.

Can you check the accuracy?

Best regards

Harush

void init_SPORT_DMA(void)
{
    // DMA0 initialization
    *pREG_DMA0_CFG = 0x04101220;            // SPORT0 TX, FLOW = autobuffer, 2, MSIZE = PSIZE = 4 bytes
    *pREG_DMA0_ADDRSTART = TX_buffer;       // Start address of TX buffer
    *pREG_DMA0_XCNT = BUFFER_SIZE;          // Number of words to transmit
    *pREG_DMA0_YCNT = 2;                    // Number of buffers
    *pREG_DMA0_XMOD = 4;                    // Inner loop address increment
    *pREG_DMA0_YMOD = 4;                    // Outer loop address increment

    // SPORT0_A initialization
 
    *pREG_SPORT0_CTL_A = 0x020158f2;        // Set up SPORT0 (A) as TX to CODEC, LFS = 1, I2S, 16 bits, IFS = 1
	*pREG_SPORT0_DIV_A = 0x00400001;        // 64 bits per frame, clock divisor of 1
}



I tried modifying the code
[edited by: Jigfirm at 5:16 AM (GMT 0) on 10 Feb 2020]