MCUXpresso SDK Documentation

i3c_master_read_sensor_lsm6dso

i3c_master_read_sensor_lsm6dso#

Overview#

The example shows how to use i3c driver as master to read on board sensor lsm6dso.

The example will read WHO_AM_I value from lsm6dso.

Supported Boards#

EVK9-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • MIMX8ULP-EVK/EVK9 board

  • Personal Computer

Board settings

Populate R147 with 0Ω Remove R58/60/81/82/90 Populate 1K resistance between J23-1 and J23-5 Connect J23-1 to the pad of R58 closer to U11 Connect J23-6 to the pad of R60 closer to U11

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. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The following message shows in the terminal if the example runs successfully.

I3C master read sensor data example.

Start to do I3C master transfer in SDR mode.

Success to read WHO_AM_I register value from LSM6DSO on board in I3C SDR mode, the value is 0x6C.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
EVK-MIMX8ULP
Hardware requirements
  • Micro USB cable

  • MIMX8ULP-EVK/EVK9 board

  • Personal Computer

Board settings

Populate R147 with 0Ω Remove R58/60/81/82/90 Populate 1K resistance between J23-1 and J23-5 Connect J23-1 to the pad of R58 closer to U11 Connect J23-6 to the pad of R60 closer to U11

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. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The following message shows in the terminal if the example runs successfully.

I3C master read sensor data example.

Start to do I3C master transfer in SDR mode.

Success to read WHO_AM_I register value from LSM6DSO on board in I3C SDR mode, the value is 0x6C.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
MIMXRT1180-EVK
Hardware requirements
  • Micro USB cable

  • MIMXRT1180-EVK board

  • Personal Computer

Board settings

Weld 1.5kΩ to R778, weld 4.7kΩ to R779.

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. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The following message shows in the terminal if the example runs successfully.

I3C master read sensor data example.

Start to do I3C master transfer in I2C mode.

Success to read WHO_AM_I register value from LSM6DSO on board, the value is 0x6C.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
MCIMX93AUTO-EVK
Hardware requirements
  • USB Type-C cable

  • MCIMX93AUTO-EVK board

  • Personal Computer

Board settings

No special settings are required.

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 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

The following message shows in the terminal if the example runs successfully.

I3C master read sensor data example.

Start to do I3C master transfer in SDR mode.

Success to read WHO_AM_I register value from LSM6DSO on board in I3C SDR mode, the value is 0x6C.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
MCIMX93-EVK
Hardware requirements
  • USB Type-C cable

  • MCIMX93-EVK board

  • Personal Computer

Board settings

No special settings are required.

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 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

The following message shows in the terminal if the example runs successfully.

I3C master read sensor data example.

Start to do I3C master transfer in SDR mode.

Success to read WHO_AM_I register value from LSM6DSO on board in I3C SDR mode, the value is 0x6C.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
MCIMX93W-EVK
Hardware requirements
  • USB Type-C cable

  • MCIMX93W-EVK board

  • Personal Computer

Board settings

No special settings are required.

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 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

The following message shows in the terminal if the example runs successfully.

I3C master read sensor data example.

Start to do I3C master transfer in SDR mode.

Success to read WHO_AM_I register value from LSM6DSO on board in I3C SDR mode, the value is 0x6C.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
MCIMX93-QSB
Hardware requirements
  • USB Type-C cable

  • MCIMX93-QSB board

  • Personal Computer

Board settings

No special settings are required.

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 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

The following message shows in the terminal if the example runs successfully.

I3C master read sensor data example.

Start to do I3C master transfer in SDR mode.

Success to read WHO_AM_I register value from LSM6DSO on board in I3C SDR mode, the value is 0x6C.
~~~~~~~~~~~~~~~~~~~~~~~~~~~