Does DMAMUX configuration require the Module 'Interrupt Enable' as well as 'DMAEN'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does DMAMUX configuration require the Module 'Interrupt Enable' as well as 'DMAEN'

624 Views
wildhorsemusic
Contributor III

Hello,

I have read everything I can on the DMA and DMAMUX modules for the Kinetis K64F.  It is unclear to me whether the interrupt for the module, specifically the I2C, has to be enabled, along with the NVIC.  If someone can help me with understanding the proper configuration of the DMAMUX in order for the I2C module to properly trigger the DMAMUX. I am using MQX/KDS 3.0/KSDK 1.2

Thanks.

Labels (1)
0 Kudos
2 Replies

471 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

The DMA MUX is to select the DMA channel request source, the detailed info could be found at K64 reference manual chapter 3.3.9 (page 93).

The I2C trigger DMA need to set both the DMAEN bit and IICIE bit. The I2C TCF flag set will trigger DMA, while the other I2C event will trigger I2C interrupt service routine (I2C interrupt, Need set NVIC to enable I2C related I2C interrupt).

More detailed info, please check K64 reference manual chapter 51.4.9 (page 1524).


Wish it helps
Have a great day,
Ma Hui

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

0 Kudos

471 Views
wildhorsemusic
Contributor III

Thank you Ma Hui,  I had already noticed that page that says that both the DMAEN and II2CIE needed to be set.  However, it wasn't clear if I needed to still provide an interrupt handler.  If the DMAMUX is handling the interrupt, then it should be bypassing the NVIC, correct?  And therefore would not need to configure an interrupt handler, correct?

Thank you, I know these are basic questions, but I have not been able to get the DMAMUX to fire when an I2C TCF is set.

By the way, it's surprising that the TCF flag is set for BOTH writes to configuration registers and read/write to the data register.  I think that configuration registers are able to be written at full processor speeds and therefore don't need the TCF.  I would prefer that the TCF only be set when the data register is read or written to.  Because of this, it virtually impossible to create a I2C driver that is 100% DMA/DMAMUX.

Do you have an example I2C driver that is 100% DMA?  I just want the DMA to keep filling the buffer from the I2C without having to use the CPU to tell the remote I2C device to send the data first.

Duane

0 Kudos