AnsweredAssumed Answered

Trying to work through SAI with DMA on Kinetis K22.

Question asked by Donald Bosley on Nov 11, 2014
Latest reply on Nov 20, 2014 by Donald Bosley

Working through setting up SAI with DMA for K22. SAI was very easy, clear documentation. DMA is a little more convoluted with a variety of data structures used between TWR Examples (which incorporate the soundcard API), AN4520, AN4800, and eDMA APIs. I need to clarify some things, so let's start with this :

 

1) EDMA_DRV_RequestChannel works in terms of assigning a channel using either the kEDMAAnyChannel, or by directly selecting the channel I want. Verified with the return argument however :

"chn : The pointer to the eDMA channel state...The use must pass the memory for this run-time state structure and the eDMA peripheral driver fills out the members. This run-time..."

 

The only member it seems to fill out is channel, so my assumption is that the remaining members will be filled by the later functions? (According to the API example, this should be fine)

 

2)But, when I go to fire off the next function EDMA_DRV_ConfigLoopTransfer, I'm dumping in to default handler. I have the fsl_edma_irq.c included, and the functions are showing up, so I know the default IRQs set in SETUP are available, or at least appear to be.

     The subfunction it's tanking at is:

    /* Set the software TCD memory to default value. */

    memset(stcdAddr, 0, number * sizeof(edma_software_tcd_t));

 

Any clues?

Outcomes