Mark Wickert

Real-time DSP using the LPC55S69 i2s Examples

Discussion created by Mark Wickert on Jun 8, 2020
Latest reply on Aug 4, 2020 by Sabina Bruce

I currently experimenting with the LPC55S69 i2s examples i2s_interrupt_record_playback and i2s_dma_record_playback examples. My starting point has been the interrupt version example. I want low latency and the ability to perform DSP math on the signal samples arriving at the ADC side of the wm8904 codec and then send the modified signal samples to the DAC side of the wm8904 codec. The key code as I see it are the two callbacks:

 

static void TxCallback(I2S_Type *base, i2s_handle_t *handle, status_t completionStatus, void *userData)

{

    /* Enqueue the same original s_Buffer all over again */

    i2s_transfer_t *transfer = (i2s_transfer_t *)userData;

    I2S_TxTransferNonBlocking(base, handle, *transfer);

}

 

static void RxCallback(I2S_Type *base, i2s_handle_t *handle, status_t completionStatus, void *userData)

{

    /* Enqueue the same original s_Buffer all over again */

    i2s_transfer_t *transfer = (i2s_transfer_t *)userData;

    I2S_RxTransferNonBlocking(base, handle, *transfer);

}

 

 Where should be I redoing the DSP math? What changes to to I2S code can/should be made to maximize the processing time available to the DSP math operations. I would ultimately like to be using the PowerQuad and related CMSIS-DSP functions. When I use a logic analyzer to monitor entry to the two callbacks I a lot of "thrashing" between the two callbacks. Do I or can I change the configuration of the callbacks to the Tx waits until the Rx is done with sample processing and can now update the Tx buffer? Out their app notes that I can read?

 

Also, I am using MCUXpresso IDE v11.1.1 [Build 3241] [2020-03-02]

and 55S69 SDK 2.7.1.

 

Thanks any your help you can provide.

Outcomes