anactrl_measure_frequency#
Overview#
The anactrl_measure_frequency Example project is to demonstrate usage of the KSDK anactrl driver. In the example, you can set a reference clock and target clock. The project will calculate the frequency of the target clock according to the reference clock frequency.
Supported Boards#
FRDM-MCXW23
Hardware requirements
Type-C USB cable
FRDM-MCXW23 Board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J10.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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 example output of the ANACTRL driver demo in the terminal window:
Analog control measure frequency example.
Reference clock source: 1 MHz FRO clock.
Target clock source: 32kHz RTC clock.
Target clock frequency: 32242 Hz.
LPCXpresso55S06
Hardware requirements
Mini/micro USB cable
LPCXpresso55S06 board
Personal Computer
Board settings
Prepare the Demo
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J1) on the board
Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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 example output of the ANACTRL driver demo in the terminal window:
Analog control measure frequency example.
Reference clock source: wdt oscillator.
Target clock source: 32kHz oscillator.
Target clock frequency: 29799 Hz.
LPCXpresso55S16
Hardware requirements
Mini/micro USB cable
LPCXpresso55S16 board
Personal Computer
Board settings
The jumper setting: Default jumpers configuration does not work, you will need to add JP20 and JP21 (JP22 optional for ADC use)
Prepare the Demo
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J1) on the board
Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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 example output of the ANACTRL driver demo in the terminal window:
Analog control measure frequency example.
Reference clock source: wdt oscillator.
Target clock source: 32kHz oscillator.
Target clock frequency: 29799 Hz.
LPCXpresso55S28
Hardware requirements
Mini/micro USB cable
LPCXpresso55S28 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Note: MCUXpresso IDE project default debug console is semihost
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board
Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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 example output of the ANACTRL driver demo in the terminal window:
Analog control measure frequency example.
Reference clock source: wdt oscillator.
Target clock source: 32kHz oscillator.
Target clock frequency: 29799 Hz.
LPCXpresso55S69
Hardware requirements
Mini/micro USB cable
LPCXpresso55s69 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Note: MCUXpresso IDE project default debug console is semihost
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board
Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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 example output of the ANACTRL driver demo in the terminal window:
Analog control measure frequency example.
Reference clock source: wdt oscillator.
Target clock source: 32kHz oscillator.
Target clock frequency: 29799 Hz.
MCXW23-EVK
Hardware requirements
Mini/micro USB cable
MCXW23-EVK Board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J33.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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 example output of the ANACTRL driver demo in the terminal window:
Analog control measure frequency example.
Reference clock source: 1 MHz FRO clock.
Target clock source: 32kHz RTC clock.
Target clock frequency: 32242 Hz.