This is the documentation for the latest (main) development branch of mcuxpresso sdk. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Hardware requirements

  • USB Type-C cable

  • MCIMX93-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

Connect J1001-3(IOMUXC_PAD_GPIO_IO02__FLEXIO1_FLEXIO02) and J1005-7(GND) to Oscilloscope

Note

Please run the application in Low Power boot mode (without Linux BSP). The IP module resource of the application is also used by Linux BSP. Or, run with Single Boot mode by changing Linux BSP to avoid resource conflict.

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 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 re-power up your board or launch the debugger in your IDE to begin running the example.

Running the demo

When the example runs successfully, if the input duty cycle range is 0~100, You can see similar information from the terminal as follows:

FLEXIO_PWM demo start.

Please input a value (0 - 100) to set duty cycle: 10
Input value is 10

PWM duty cycle is: 10

PWM leave is: 0

Please input a value (0 - 100) to set duty cycle: 150
Input value is 150
Your value is output of range.
Set pwm output to IDLE.

Please input pwm idle status (0 or 1): 1
Input IDLE state value is 1

PWM leave is: 1

Please input a value (0 - 100) to set duty cycle:
......

Note:

  1. The duty cycle of the PWM is variable, except for the idle state, 0 and 100.

  2. If the input duty cycle range exceeds 100, the pwm will be set to idle state

  3. If the set pwm idle value is out of range, it will output “Your value is output of range.” and then return to set the duty cycle.