FTM channel, setting DMA event

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FTM channel, setting DMA event

1,282 次查看
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?

标签 (1)
标记 (1)
0 项奖励
回复
2 回复数

1,073 次查看
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 项奖励
回复

1,073 次查看
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 项奖励
回复