MCUXpresso SDK Documentation

cmu_fm_interrupt

cmu_fm_interrupt#

Overview#

The cmu_fm driver example is to demonstrate usage of the SDK CMU_FM driver with interrupt callback functions. In this example, the minimum number of reference clock cycles is calculated as metering window. The CMU_FM count the target clock cycles and generate an interrupt within the given reference clock cycles. The expected and the measured frequency of the monitored clock are printed out in the terminal.

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:

CMU_FM interrupt example.
Clock frequency to be measured: 32000 Hz.
Metered clock frequency: 31897 Hz.
Deviation is within the scope.
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:

CMU_FM interrupt example.
Clock frequency to be measured: 32000 Hz.
Metered clock frequency: 31897 Hz.
Deviation is within the scope.