Hardware requirements
Type-C USB cable
FRDM-MCXW23 Board
Personal Computer
Board settings
The switch for this examples is SW2 on the board (PIO0_18)
Output signal Board location
SCT0_OUT4 J2-6
SCT0_OUT5 J2-7
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 SCTimer multi-state demo in the terminal window:
SCTimer example to output edge-aligned PWM signal
When user presses a switch the PWM signal will be seen from Out 5
When user presses the switch again PWM signal on Out 5 will turn off
The PWM signal from Out 4 will remain active all the time
Probe an oscilloscope to the output pins described in board settings, you will see one PWM signal present all the time. While The other PWM signal is triggered by the switch described in the board settings.