MCUXpresso SDK Documentation

rgpio_led_output

rgpio_led_output#

Overview#

The RGPIO Example project is a demonstration program that uses the SDK software to manipulate the general-purpose outputs. The example is supported by the set, clear, and toggle write-only registers for each port output data register. The example take turns to shine the LED.

Supported Boards#

EVK9-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • MIMX8ULP-EVK9 board

  • J-Link Debug Probe

  • 5V power supply

  • Personal Computer

Board settings

No special settings are required.

Please note this application can’t support running with Linux BSP!

Prepare the Demo
  1. Connect 5V power supply and JLink Plus to the board, switch SW10 to power on the board

  2. Connect a micro USB cable between the host PC and the J17 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. Build the project

  5. Generate flash.bin with imx-mkimage and download it according to Getting Started doc

  6. Open two serials lines provided at J17 USB port. (e.g. /dev/ttyUSB0~3, /dev/ttyUSB2 for A Core, /dev/ttyUSB3 for M Core)

  7. Repower on board and stop in U-Boot command line.

Running the demo

When the example runs successfully, the RGB LED(U15) on board will shine with blue light and the following message is displayed in the terminal:

 RGPIO Driver example
 The LED is taking turns to shine.
IMX952LPD5EVK-19
Hardware requirements
  • Micro USB cable

  • IMX952-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

Connect J22-3(GPIO_IO03 pad, I2C6_SCL_3V3) and j22-8(GND) to oscilloscope

Please note this application can’t support running with Linux BSP!
Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW4 to power on the board

  2. Connect a micro USB cable between the host PC and the J31 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
EVK-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • MIMX8ULP-EVK board

  • J-Link Debug Probe

  • 5V power supply

  • Personal Computer

Board settings

No special settings are required.

Please note this application can’t support running with Linux BSP!

Prepare the Demo
  1. Connect 5V power supply and JLink Plus to the board, switch SW10 to power on the board

  2. Connect a micro USB cable between the host PC and the J17 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. Build the project

  5. Generate flash.bin with imx-mkimage and download it according to Getting Started doc

  6. Open two serials lines provided at J17 USB port. (e.g. /dev/ttyUSB0~3, /dev/ttyUSB2 for A Core, /dev/ttyUSB3 for M Core)

  7. Repower on board and stop in U-Boot command line.

Running the demo

When the example runs successfully, the RGB LED(U15) on board will shine with blue light and the following message is displayed in the terminal:

 RGPIO Driver example
 The LED is taking turns to shine.
MIMXRT1180-EVK
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1180-EVK board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port 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

These instructions are displayed/shown on the terminal window:

GPIO Driver example
The LED is blinking.

And you will find 1 LED is taking turns to shine.

IMX95LPD5EVK-19
Hardware requirements
  • Micro USB cable

  • IMX95LPD5-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

Connect J22-3(GPIO_IO03 pad, I2C6_SCL_3V3) and j22-8(GND) to oscilloscope

Please note this application can’t support running with Linux BSP!

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW4 to power on the board

  2. Connect a micro USB cable between the host PC and the J31 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
FRDM-IMX95
Hardware requirements
  • Micro USB cable

  • FRDM-IMX95 board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

Connect J19-5(GPIO_IO03 pad, I2C6_SCL_3V3) and J19-9(GND) to oscilloscope

Please note this application can’t support running with Linux BSP!

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW4 to power on the board

  2. Connect a micro USB cable between the host PC and the J31 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
FRDM-IMX952
Hardware requirements
  • Micro USB cable

  • FRDM-IMX952 board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

Connect J18 pin 5 (GPIO_IO03) and J18 pin 6 (GND) to oscilloscope.

Note: J18 is the 40-PIN GPIO HDR expansion connector. - J18-Pin5: GPIO_IO03 (RGPIO2_IO03) - GPIO output signal - J18-Pin6: Common Ground

Please note this application can’t support running with Linux BSP!
Prepare the Demo
  1. Connect 12V~20V power supply and J-Link Debug Probe to the board, switch SW4 to power on the board.

  2. Connect a micro USB cable between the host PC and the J31 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
FRDM-IMX937
Hardware requirements
  • Micro USB cable

  • FRDM-IMX937 board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

Connect J19-5(GPIO_IO03 pad, I2C6_SCL_3V3) and J19-9(GND) to oscilloscope

Please note this application can’t support running with Linux BSP!

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW4 to power on the board

  2. Connect a micro USB cable between the host PC and the J31 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
MCIMX93AUTO-EVK
Hardware requirements
  • USB Type-C cable

  • MCIMX93AUTO-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW2 to power on the board

  2. Connect a USB Type-C cable between the host PC and the J26 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
MCIMX93-EVK
Hardware requirements
  • USB Type-C cable

  • MCIMX93-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
MCIMX93W-EVK
Hardware requirements
  • USB Type-C cable

  • MCIMX93W-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
MCIMX93-QSB
Hardware requirements
  • USB Type-C cable

  • MCIMX93-QSB board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

No special settings are required.

Please note this application can’t support running with Linux BSP!

Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW301 to power on the board

  2. Connect a USB Type-C cable between the host PC and the J1708 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: The LED D1402 will shine with GREEN color light. Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
IMX943-EVK
Hardware requirements
  • Micro USB cable

  • IMX943-EVK board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

Connect J44-10(GPIO_IO31 pad, signal name M1_LED_TP1) and J43-14(GND) to oscilloscope

Please note this application can’t support running with Linux BSP!
Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW1(SYS_PWR) to power on the board

  2. Connect a micro USB cable between the host PC and the J15(FTDI_DEBUG) 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.
FRDM-IMXRT1186
Hardware requirements
  • Type-C USB cable

  • FRDM-IMXRT1186 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port 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

These instructions are displayed/shown on the terminal window:

GPIO Driver example
The LED is blinking.

And you will find 1 LED is taking turns to shine.

IMX943-ORANGEBOX
Hardware requirements
  • Micro USB cable

  • IMX943-ORANGEBOX board

  • J-Link Debug Probe

  • 12V~20V power supply

  • Personal Computer

Board settings

Connect J1305-2(GPIO_IO00 pad, signal name IMX_UART5_TX) and J29-4(GND) to oscilloscope

Please note this application can’t support running with Linux BSP!
Prepare the Demo
  1. Connect 12V~20V power supply and JLink Plus to the board, switch SW1(SYS_PWR) to power on the board

  2. Connect a micro USB cable between the host PC and the J15(FTDI_DEBUG) 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 demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal: Since no LED connected to the RGPIO. Please use oscilloscope probe to the pin to check the output. The output will toggle periodically.

 RGPIO Driver example
 The LED is taking turns to shine.