MCUXpresso SDK Documentation

tpm_output_compare

tpm_output_compare#

Overview#

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

Supported Boards#

EVK9-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • MIMX8ULP-EVK/EVK9 board

  • J-Link Debug Probe

  • 5V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM33: connect J11-3 and J11-5(GND) to Oscilloscope

Prepare the Demo
  1. Connect 5V power supply and J-Link Debug Probe to the board, switch SW10 to power on the board.

  2. Connect a micro USB cable between the host PC and the J17 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
IMX952LPD5EVK-19
Hardware requirements
  • Micro USB cable

  • IMX952-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM7: connect TP86 and (GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW4 to power on the board.

  2. Connect a micro USB cable between the host PC and the J31 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
EVK-MCIMX7ULP
Hardware requirements
  • Micro USB cable

  • MCIMX7ULP-EVK board

  • J-Link Debug Probe

  • 5V power supply

  • Personal Computer

  • Oscilloscope

Board settings

Connect TP86(PTB0) to Oscilloscope channel 1.

Please note this application can’t support running with Linux BSP!

Prepare the Demo
  1. Connect 5V power supply and J-Link Debug Probe to the board, switch SW1 to power on the board.

  2. Connect a micro USB cable between the host PC and the J6 USB port on the target board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

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

Running the demo

When the example runs successfully, you can see information from the terminal as below.

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
EVK-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • MIMX8ULP-EVK/EVK9 board

  • J-Link Debug Probe

  • 5V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM33: connect J11-3 and J11-5(GND) to Oscilloscope

Prepare the Demo
  1. Connect 5V power supply and J-Link Debug Probe to the board, switch SW10 to power on the board.

  2. Connect a micro USB cable between the host PC and the J17 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
FRDM-K32L2A4S
Hardware requirements
  • Mini/micro USB cable

  • FRDM-K32L2A4S board

  • Personal Computer

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

When the example runs successfully, you can see information from the terminal as below.

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

In this example green led blinks.

FRDM-K32L2B
Hardware requirements
  • Mini/micro USB cable

  • FRDMK32L2B board

  • 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

  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

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

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

In this example GREEN LED blinks.

FRDM-K32L3A6
Hardware requirements
  • Mini/micro USB cable

  • FRDM-K32L3A6 board

  • Personal Computer

  • Oscilloscope

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

  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

When the example runs successfully, you can see information from the terminal as below.

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

M4 core: Use oscilloscope to measure output signal pin at PTB2(J2-2) pin of FRDM-K32L3A6 board. M0 core: Use oscilloscope to measure output signal pin at PTB13(J1-8) pin of FRDM-K32L3A6 board.

FRDM-KE02Z40M
Hardware requirements
  • Mini/micro USB cable

  • FRDM-KE02Z40M board

  • Personal Computer

  • Oscilloscope

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

  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

When the example runs successfully, you can see information from the terminal as below.

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
  • Probe oscilloscope at PTA0 (J2-2) to see output signal.

FRDM-MCXC041
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXC041 board

  • Personal Computer

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:

    • 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 example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
FRDM-MCXC242
Hardware requirements
  • USB-C cable

  • FRDM-MCXC242 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

When the example runs successfully, you can see information from the terminal as below.

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

In this example the green LED blinks

FRDM-MCXC444
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXC444 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a type-c USB cable between the host PC and the MCU-Link USB port (J13) 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 demo.

Running the demo

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

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

In this example GREEN LED blinks.

FRDM-MCXW71
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXW71 Board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J10.

  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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Use oscilloscope to measure output signal pin at J1-8.

MCX-W71-EVK
Hardware requirements
  • Type-C USB cable

  • MCX-W71-EVK Board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J14.

  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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Use oscilloscope to measure output signal pin at J1-15.

IMX95LPD5EVK-19
Hardware requirements
  • Micro USB cable

  • IMX95LPD5-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM7: connect R881 and (GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW4 to power on the board.

  2. Connect a micro USB cable between the host PC and the J31 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
FRDM-IMX95
Hardware requirements
  • Micro USB cable

  • FRDM-IMX95 board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM7: connect J19-32 and (GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW4 to power on the board.

  2. Connect a micro USB cable between the host PC and the J31 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
FRDM-IMX952
Hardware requirements
  • Micro USB cable

  • IMX952-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM7: connect GPIO_IO13(J18-33) and (GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW4 to power on the board.

  2. Connect a micro USB cable between the host PC and the J31 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
FRDM-IMX937
Hardware requirements
  • Micro USB cable

  • FRDM-IMX937 board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM7: connect J19-32 and (GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW4 to power on the board.

  2. Connect a micro USB cable between the host PC and the J31 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
KW45B41Z-EVK
Hardware requirements
  • Mini/micro USB cable

  • KW45B41Z-EVK Board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J14.

  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 demo.

Running the demo

The following lines are printed to the serial terminal when the demo program is executed.

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Use oscilloscope to measure output signal pin at J1-8.

KW47-EVK
Hardware requirements
  • Type-C USB cable

  • KW47-EVK Board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J14.

  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 demo.

Running the demo

The log below shows the output of the demo in the terminal window:

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Use oscilloscope to measure output signal pin at J1-15.

MCIMX93AUTO-EVK
Hardware requirements
  • USB Type-C cable

  • MCIMX93AUTO-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM33: connect J17-16 and J17-29(GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW2 to power on the board.

  2. Connect a USB Type-C cable between the host PC and the J26 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
MCIMX93-EVK
Hardware requirements
  • USB Type-C cable

  • MCIMX93-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM33: connect J1005-3 and J1005-7(GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW301 to power on the board.

  2. Connect a USB Type-C cable between the host PC and the J1401 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
MCIMX93W-EVK
Hardware requirements
  • USB Type-C cable

  • MCIMX93W-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM33: connect J1005-3 and J1005-7(GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW301 to power on the board.

  2. Connect a USB Type-C cable between the host PC and the J1401 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
MCIMX93-QSB
Hardware requirements
  • USB Type-C cable

  • MCIMX93-QSB board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings
  • CM33: connect J1406-3 and J1406-7(GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW301 to power on the board.

  2. Connect a USB Type-C cable between the host PC and the J1708 USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
IMX943-EVK
Hardware requirements
  • Micro USB cable

  • IMX943-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

  • Oscilloscope

Board settings

Connect J47-6 and J47-14(GND) to Oscilloscope

Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW1(SYS_PWR) to power on the board.

  2. Connect a micro USB cable between the host PC and the J15(FTDI_DEBUG) USB port on the cpu board.

  3. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  4. Download the program to the target board.

  5. Launch the debugger in your IDE to begin running the example.

Running the demo

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

TPM example for output compare
You will see the output signal toggle
Probe the signal using an oscilloscope
MCX-W72-EVK
Hardware requirements
  • Type-C USB cable

  • MCX-W72-EVK Board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J14.

  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 demo.

Running the demo

The log below shows the output of the demo in the terminal window:

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Use oscilloscope to measure output signal pin at J1-15.

KW47-LOC
Hardware requirements
  • Type-C USB cable

  • KW47-LOC Board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a USB cable between the host PC and the LOC board J3.

  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 demo.

Running the demo

The log below shows the output of the demo in the terminal window:

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Use oscilloscope to measure output signal pin at J1-1.

MCXW72-LOC
Hardware requirements
  • Type-C USB cable

  • MCXW72-LOC Board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a USB cable between the host PC and the LOC board J3.

  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 demo.

Running the demo

The log below shows the output of the demo in the terminal window:

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Use oscilloscope to measure output signal pin at J1-1.

FRDM-MCXW72
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXW72 Board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J10.

  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 demo.

Running the demo

The log below shows the output of the demo in the terminal window:

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Use oscilloscope to measure output signal pin at J1-8.

FRDM-KW43
Hardware requirements
  • Type-C USB cable

  • FRDM-KW43 Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J28.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The log below shows the output of the demo in the terminal window:

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Please monitor the PWM waveform on connector J19, pin 3 (PTB0) using an oscilloscope.

FRDM-MCXW70
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXW70 Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J28.

  2. Open a serial terminal on PC for the serial device 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 demo.

Running the demo

The log below shows the output of the demo in the terminal window:

TPM example for output compare

You will see the output signal toggle
Probe the signal using an oscilloscope

Please monitor the PWM waveform on connector J19, pin 3 (PTB0) using an oscilloscope.