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?
Hi Keith:
Please refer to section 38.4.23 DMA of the reference manual.
Regards
Daniel
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