herunterladen

© 2016 Freescale Semiconductor, Inc. All rights reserved.
Preliminary Information, Subject to Change without Notice
Using DMA for Pulse Counting on S32K
1. Introduction
This application note describes pulse counting on the
S32K product series of 32-bit automotive MCUs using
the Enhanced Direct Memory Access (eDMA) and
PORT modules. The number of the signal pulses can be
counted using the Low-Power Timer (LPTMR) or
the FlexTimer (FTM). However, the number of pulse
inputs is limited, because the FTM module is usually
used for PWM generation and LPTMR has only one
counter inside.
In this application note, the PORT module is utilized to
capture multiple pulse inputs and the eDMA channel’s
Current Major Iteration Counter (CITER) register is
used as a simple pulse counter.
This S32K chip configuration offers up to five pulse
input channels that can be evaluated simultaneously.
This way, the CPU load is also rapidly reduced.
This application note addresses primarily the S32K
product series of 32-bit automotive MCUs.
Freescale Semiconductor, Inc.
Document Number:
AN5258
Application Note
Rev.
0
,
02/2016
Contents
1. Introduction ........................................................................ 1
2. Functional Description ....................................................... 2
3. Initialization and Application ............................................. 3
4. Functional Limitations ....................................................... 5
4.1. Maximum eDMA transfer ....................................... 5
4.2. eDMA major loop counter ...................................... 5
5. Conclusion ......................................................................... 5
6. Revision History ................................................................ 6