I3C Examples (Blocking API)
Overview
The blocking I3C examples include multiple scenarios. Current documented examples:
- Basic API:
C:
examples/blocking_api/i3c/basic/c/C++:
examples/blocking_api/i3c/basic/cpp/
- CCC API:
C:
examples/blocking_api/i3c/ccc/c/C++:
examples/blocking_api/i3c/ccc/cpp/
- DAA API:
C:
examples/blocking_api/i3c/daa/c/C++:
examples/blocking_api/i3c/daa/cpp/
- HDR-DDR API:
C:
examples/blocking_api/i3c/hdr-ddr/c/C++:
examples/blocking_api/i3c/hdr-ddr/cpp/
- Hot-Join + IBI API:
C:
examples/blocking_api/i3c/hj-ibi/c/C++:
examples/blocking_api/i3c/hj-ibi/cpp/
I3C Basic API Examples
Hardware setup
Required hardware:
One Binho Supernova
One Binho I3C Target Board
One STMicroelectronics STEVAL-MKI239A
One Bosch Sensortec BMI323 Shuttle Board 3.0
One Adafruit I2C FRAM Breakout Board (legacy I2C target on the I3C bus)
Useful references:
Binho I3C Target Board: binho.io/test-measurement/products/usb-host-adapters/accessories/i3c-target-board/
STMicroelectronics STEVAL-MKI239A: st.com/en/evaluation-tools/steval-mki239a.html
Bosch Sensortec BMI323: bosch-sensortec.com/products/motion-sensors/imus/bmi323/
Adafruit I2C FRAM breakout: adafruit.com/product/1895
What The Basic I3C Examples Do
Connect to the adapter and print host device information.
Set I3C VTARG to
3300 mV.Initialize the I3C controller and then reconfigure I3C parameters.
Read and print the target device table.
Initialize the I3C bus with dynamic discovery and print the updated table.
Reset the bus.
Re-initialize the bus with a static target table (including I3C + legacy I2C target entries) and print the resulting table.
Update target configuration and print the table again.
Notes
These examples exercise the basic I3C controller API (bus init/reset, table management, and target configuration updates).
The C and C++ examples implement the same flow with their corresponding API wrappers.
See also:
Build and Run (I3C Basic C/C++)
I3C basic example directories build binaries with the following names:
- C (
examples/blocking_api/i3c/basic/c/): example_c_dynamicexample_c_static
- C (
- C++ (
examples/blocking_api/i3c/basic/cpp/): example_cpp_dynamicexample_cpp_static
- C++ (
CCC Examples
Hardware setup
Required hardware:
One Binho Supernova
One Binho I3C Target Board
One STMicroelectronics STEVAL-MKI239A
One Bosch Sensortec BMI323 Shuttle Board 3.0
Useful references:
Binho I3C Target Board: binho.io/test-measurement/products/usb-host-adapters/accessories/i3c-target-board/
STMicroelectronics STEVAL-MKI239A: st.com/en/evaluation-tools/steval-mki239a.html
Bosch Sensortec BMI323: bosch-sensortec.com/products/motion-sensors/imus/bmi323/
What The CCC Examples Do
Connect to the adapter and initialize the I3C controller and bus.
Retrieve and print the target device table.
- Execute representative CCC reads:
GETPID,GETBCR,GETDCR,GETCAPSGETMRLandGETMWL
- Execute representative CCC writes and controls:
SETMRLandSETMWL(direct and broadcast)DISECandENEC(direct and broadcast)RSTACT(direct and broadcast)
Emit
Target Reset PatternandHDR Exit Pattern.
Build and Run (I3C CCC C/C++)
I3C CCC example directories build binaries with the following names:
- C (
examples/blocking_api/i3c/ccc/c/): example_c_dynamicexample_c_static
- C (
- C++ (
examples/blocking_api/i3c/ccc/cpp/): example_cpp_dynamicexample_cpp_static
- C++ (
DAA Examples
Hardware setup
Required hardware:
One Binho Supernova
One Binho I3C Target Board
One STMicroelectronics STEVAL-MKI239A
One Bosch Sensortec BMI323 Shuttle Board 3.0
Useful references:
Binho I3C Target Board: binho.io/test-measurement/products/usb-host-adapters/accessories/i3c-target-board/
STMicroelectronics STEVAL-MKI239A: st.com/en/evaluation-tools/steval-mki239a.html
Bosch Sensortec BMI323: bosch-sensortec.com/products/motion-sensors/imus/bmi323/
What The DAA Examples Do
Connect to the adapter and initialize the I3C bus.
- Run DAA-related command flows in separate stages:
SETDASAto assign dynamic addresses from known static addresses.SETAASAto adopt static addresses as dynamic addresses.ENTDAAto run dynamic address assignment arbitration.SETNEWDAto reassign an already assigned dynamic address.
Read and print the target table after each stage to visualize address changes.
Build and Run (I3C DAA C/C++)
I3C DAA example directories build binaries with the following names:
- C (
examples/blocking_api/i3c/daa/c/): example_c_dynamicexample_c_static
- C (
- C++ (
examples/blocking_api/i3c/daa/cpp/): example_cpp_dynamicexample_cpp_static
- C++ (
HDR-DDR Examples
Hardware setup
Required hardware:
One Binho Supernova
One Binho mikroBUS Adapter Board
One MikroE 6DOF IMU 14 Click
Important board configuration for I3C:
On 6DOF IMU 14 Click, the
COMM SELhardware jumpers (JP2,JP3,JP4) select protocol.Default factory position is SPI (left position).
For I2C/I3C operation, move all three jumpers to the right position (I2C selection).
Useful references:
Binho mikroBUS Adapter Board: binho.io/test-measurement/products/usb-host-adapters/accessories/mikrobus-adapter-board/
6DOF IMU 14 Click product page: mikroe.com/6dof-imu-14-click
6DOF IMU 14 Click schematic: download.mikroe.com/documents/add-on-boards/click/6dof-imu-14-click/6DOF_IMU_14_click_v100_Schematic.PDF
ICM-42688-P datasheet: invensense.tdk.com/download-pdf/icm-42688-p-datasheet/
What The HDR-DDR Examples Do
Connect to the adapter and initialize I3C.
Execute an HDR-DDR write to a target register path.
Reset the target register pointer with an SDR command.
Execute an HDR-DDR read and print returned bytes.
Build and Run (I3C HDR-DDR C/C++)
I3C HDR-DDR example directories build binaries with the following names:
- C (
examples/blocking_api/i3c/hdr-ddr/c/): example_c_dynamicexample_c_static
- C (
- C++ (
examples/blocking_api/i3c/hdr-ddr/cpp/): example_cpp_dynamicexample_cpp_static
- C++ (
Hot-Join + IBI Examples
Hardware setup
Required hardware:
One Binho Supernova
One Microchip PIC18F16Q20 Curiosity Nano
One Binho PIC18F16Q20 Curiosity Nano I3C Target Demo Board
One Adafruit I2C FRAM Breakout Board
On-board W25Q64JV SPI flash (integrated on the Binho PIC18F16Q20 demo board)
Firmware and setup notes:
The PIC firmware project archive is provided in:
examples/blocking_api/i3c/hj-ibi/assets/pic18f16q20-fw-mplabx-project/pic18f16q20-i3c-multi-protocol-translator-modified.zip.Informative illustrations of the hardware setup and firmware flow are included in
examples/blocking_api/i3c/hj-ibi/assets/pictures.This firmware implements an I3C-to-I2C/SPI translator.
Initialize the Supernova I3C controller first, then power up the PIC board so it joins the bus via Hot-Join.
I3C bus voltage in this setup is
1.2 V.
Important IBI payload limit:
Read responses are returned via IBI payloads.
Supernova supports IBI payloads up to 8 bytes total, including MDB.
Therefore translator read requests should be limited to
<= 7data bytes.
Useful references:
Binho PIC18F16Q20 Curiosity Nano I3C Target Demo Board: binho.io/test-measurement/products/usb-host-adapters/accessories/pic18f16q20-curiosity-nano/
Adafruit I2C FRAM breakout: adafruit.com/product/1895
What The Hot-Join + IBI Examples Do
Connect to the adapter and initialize I3C controller + bus.
Wait for PIC Hot-Join and capture dynamic address from notification callback.
- Issue translator commands over I3C SDR for downstream I2C:
Write bytes to FRAM
Reset FRAM internal pointer
Request FRAM read and receive data via IBI
- Issue translator commands over I3C SDR for downstream SPI flash:
Read JEDEC ID (response via IBI)
Write Enable
Write Status Register-1
Read Status Register-1 (response via IBI)
Use event-based synchronization between callback and main flow to wait for Hot-Join/IBI events.
Build and Run (I3C Hot-Join + IBI C/C++)
I3C Hot-Join + IBI example directories build binaries with the following names:
- C (
examples/blocking_api/i3c/hj-ibi/c/): example_c_dynamicexample_c_static
- C (
- C++ (
examples/blocking_api/i3c/hj-ibi/cpp/): example_cpp_dynamicexample_cpp_static
- C++ (