MCUXpresso SDK Documentation

stm_match_interrupt

stm_match_interrupt#

Overview#

The stm driver example is to demonstrate usage of the SDK STM driver with interrupt callback functions. In this example two channels are configured with different match values, when STM timer count matches the channel value, “Channel ${number} match.” log will be printed to the terminal from interrupt callback function for this channel.

Supported Boards#

FRDM-MCXE31B
Hardware requirements
  • Type-C USB cable

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

The log below shows the output of the terminal window:

STM match example.
Channel 1 match.
Channel 0 match.
Channel 1 match.
Channel 1 match.
Channel 0 match.
Channel 1 match.
FRDM-MCXE32B
Hardware requirements
  • Type-C USB cable

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

The log below shows the output of the terminal window:

STM match example.
Channel 1 match.
Channel 0 match.
Channel 1 match.
Channel 1 match.
Channel 0 match.
Channel 1 match.