Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
FTM PDB ADC Demo

This demo application demonstrates how to use FTM external trigger to start ADC conversion via PDB.

Overview

This application demonstrates how to use the FTM external trigger to start the ADC conversion using the PDB. The FTM0 is configured as a complementary combined mode. Each channel output frequency is 16 KHz. The complementary channel dead time is 1 µs. The PDB pre-trigger works in back-to-back mode. The ADC0 and ADC1 work in single-end mode. The ADC0 uses channel 1 and channel 5. ADC1 uses channel 1 and channel 7.

Supported Platforms

This Tower System module is supported by the KSDK FTM PDB ADC demo.

System Requirement

Hardware requirements

Toolchain requirements

Software requirements

Getting Started

Hardware Settings

Use default jumper settings on TWR-KV10Z32. Ensure that the J21(2~3 is short), J22(2~3 is short), J11(1~2 is short, 3~4 is short),J12(1~2 is short, 3~4 is short).

Prepare the Demo

  1. Connect a USB cable between the PC host and the OpenSDA USB port on the board.
  2. Open a serial terminal with these settings:
    • 115200 baud rate
    • 8 data bits
    • No parity
    • One stop bit
    • No flow control
  3. Download the program to the target board.
  4. Either press the reset button on the board or launch the debugger in the IDE to begin running the demo.

For detailed instructions, see the appropriate board User's Guide.

Run the demo

  1. Download and run the ftm_pdb_adc code on the board.
  2. Terminal prints this message: "Run PDB trig ADC with FlexTimer demo." and "Input any character to start demo."
  3. Input a character to the serial terminal, which has 256 lines of information for the ADC conversion result.
  4. Input any character to the serial terminal. The process repeats again.