FTM channel, setting DMA event

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

FTM channel, setting DMA event

697 Views
Keith4DSmith
Contributor V

In the K22P144M120SF5V2RM.pdf file on Kinetis K22 Sub-Family Reference Manual, the

FTM channel control register, FTMx_CnSC, has two bits, CHIE and DMA, section 38.3.6.

CHIE - 1 Enables channel interrupts

DMA - 1 Enable DMA transfer

It appears to enable a DMA transfer from an FTM channel event, both the CHIE and DMA bits must be be on.

The documentation does not make this clear.

Is this a property of all peripherals or just the FTM?

Labels (1)
Tags (1)
0 Kudos
2 Replies

488 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Keith:

Please refer to section 38.4.23 DMA of the reference manual.

pastedImage_1.png

Regards

Daniel

0 Kudos

488 Views
mjbcswitzerland
Specialist V

Hi Keith

This is the FTM DMA enable code in the uTasker project:

            if ((ulMode & PWM_DMA_CHANNEL_ENABLE) != 0) {
                ptrFlexTimer->FTM_channel[ucChannel].FTM_CSC |= (FTM_CSC_DMA | FTM_CSC_CHIE); // enable DMA trigger from this channel (also the interrupt needs to be enabled for the DMA to operate - interrupt is however not generated in this configuration)
            }

The code comment should make it clear that it is normal that the two flags are needed and that it is maybe a little surprising since the detail in the user's manual is maybe not easy to find.

Regards

Mark

uTasker developer and supporter (+5'000 hours experience on +60 Kinetis derivatives in +80 product developments)
Kinetis: http://www.utasker.com/kinetis.html

uTasker - for more performance and faster, cheaper product development

0 Kudos