MCUXpresso SDK Documentation

ftm_output_compare

ftm_output_compare#

Overview#

The FTM project is a demonstration program of the SDK FTM driver’s output compare feature. It sets up one FTM channel to toggle the output when a match occurs with the channel value. The user should probe the FTM output with a oscilloscope to see the signal toggling.

Supported Boards#

FRDM-K22F
Hardware requirements
  • Mini/micro USB cable

  • FRDM-K22F board

  • Personal Computer

  • Oscilloscope

Board settings

This example project does not call for any special hardware configurations. Although not required, the recommendation is to leave the development board’s jumper settings and configurations in default state when running this example.

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 your board or launch the debugger in your IDE to begin running the example.

Running the demo

These instructions are displayed/shown on the terminal window:

FTM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope
  • Probe oscilloscope at PTA1 (J2-4) to see output signal.

FRDM-KE02Z40M
Hardware requirements
  • Mini/micro USB cable

  • FRDM-KE02Z40M board

  • Personal Computer

  • Oscilloscope

Board settings

This example project does not call for any special hardware configurations. Although not required, the recommendation is to leave the development board’s jumper settings and configurations in default state when running this example.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following 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 your board or launch the debugger in your IDE to begin running the example.

Running the demo

These instructions are displayed/shown on the terminal window:

FTM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope
  • Probe oscilloscope at PTC0 (J10-4) to see output signal.

FRDM-KE15Z
Hardware requirements
  • Micro USB cable

  • FRDM-KE15Z board

  • An oscilloscope

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

  • 115200 baud rate

  • 8 data bits

  • No parity

  • One stop bit

  • No flow control

  1. Download the program to the target board.

  2. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal:

FTM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
  • Probe oscilloscope at PTD1(J4-11) to see output signal.

FRDM-KE16Z
Hardware requirements
  • Micro USB cable

  • FRDM-KE16Z board

  • An oscilloscope

  • Personal Computer

Board settings

Probe oscilloscope at PTD1(J2-7) to see output signal.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

  • 115200 baud rate

  • 8 data bits

  • No parity

  • One stop bit

  • No flow control

  1. Download the program to the target board.

  2. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal:

FTM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
  • Probe oscilloscope at PTD1(J2-7) to see output signal.

FRDM-KE17Z
Hardware requirements
  • Micro USB cable

  • FRDM-KE17Z board

  • An oscilloscope

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

  • 115200 baud rate

  • 8 data bits

  • No parity

  • One stop bit

  • No flow control

  1. Download the program to the target board.

  2. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal:

FTM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
  • Probe oscilloscope at PTD1(J3-15) to see output signal.

FRDM-KE17Z512
Hardware requirements
  • Micro USB cable

  • FRDM-KE17Z512 board

  • An oscilloscope

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the MCU-LINK USB port on the target board.

  2. Open a serial terminal with the following settings:

  • 115200 baud rate

  • 8 data bits

  • No parity

  • One stop bit

  • No flow control

  1. Download the program to the target board.

  2. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal:

FTM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
  • Probe oscilloscope at PTD1(J3-15) to see output signal.

FRDM-MCXE247
Hardware requirements
  • USB-C cable

  • FRDM-MCXE247 board

  • An oscilloscope

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the MCU-LINK USB port on the target board.

  2. Open a serial terminal with the following settings:

  • 115200 baud rate

  • 8 data bits

  • No parity

  • One stop bit

  • No flow control

  1. Download the program to the target board.

  2. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal:

FTM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
  • Red led will toggle.

LPCXpresso860MAX
Hardware requirements
  • Micro USB cable

  • LPCXpresso860MAX board

  • An oscilloscope

  • Personal Computer

Board settings

The FTM pin is J1_7.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 9600 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 your board or launch the debugger in your IDE to begin running the demo.

Running the demo

These instructions are displayed/shown on the terminal window:

FTM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope