Simultaneous DMA transfer for DAC and I2C FRDMK64F

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous DMA transfer for DAC and I2C FRDMK64F

203 Views
vinods
Contributor I

Hi,

  I am transferring PCM audio to DAC peripheral via DMA in circular manner. Here the DMA is continuous and triggered by PIT at 44100 Hz. I cannot halt this at any time. I am decoding MP3 and transferring to DAC via DMA, while DMA is throwing first half of PCM, I will be decoding and filling second half and vice versa, this is working fine for now.

 I am transferring a frame buffer to OLED in one shot which I tested already with DMA transfer and it is working fine. But if DAC transfer is already happening via DMA as a continuous circular process and in the middle of it how can I do I2C transfer via DMA without affecting the DAC transfer ?

Currently I couldn't find a solution so I am using I2C BULK transfer via Interrupt in non blocking mode which works fine for me with a little penalty of ISR hit which is ok for my application. But I am curious to know if there is any way to do both DMA simultaneously ?

It seems like it is having only one DMA0 in hardware and I don't know if it can do simultaneous transfer.

Any clue?

Labels (1)
0 Kudos
1 Reply

93 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

The K64 has one eDMA module, which could allow one channel be active at the same time.

Customer can try to use the channel preemption mechanism.

I2C related DMA channel with higher priority.

Customer could try and check if the transfer data to DAC be affected during I2C DMA channel active phase.

Thank you for the attention.


Have a great day,
Mike

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos