The ConnectCore 93 Development Kit assembles one MikroE mikroBUS™ socket that allows you to connect a variety of through-hole MikroE Click boards offering sensors, mini-displays, relays, and more. See the MikroE website for more information on the mikroBUS™ socket.
Device tree bindings and customization
Three communication buses are routed to the mikroBUS™ socket:
-
I2C3 bus
-
UART7 (2-wire)
-
SPI8 bus
Additionally, the following lines of the ConnectCore 93 are connected to the mikroBUS™ socket:
-
MIKROBUS_RST
: Connected toGPIO1_IO10
-
MIKROBUS_INT
: Connected toGPIO2_IO11
UART7 lines are multiplexed with other functionality through a group of jumpers on the ConnectCore 93 Development Kit. Make sure the appropriate jumpers are connected when using UART7 on the ConnectCore 93 Development Kit. See Hardware reference manuals for information on the jumper connections and the multiplexed functionality they select. |
Each MikroE Click board requires a specific driver and device tree entry depending on the communication bus (I2C, SPI, UART) and its functionality.
For example, the Accel2 Click board uses an I2C accelerometer that requires CONFIG_IIO_ST_ACCEL_I2C_3AXIS
to be enabled in the kernel configuration (driver support) and the following device tree entry:
&lpi2c3 {
...
accelerometer@1d {
compatible = "st,lis3dh-accel";
reg = <0x1d>;
};
...
};
Device tree overlays for MikroE Click boards
Digi Embedded Yocto has device tree overlays for the following MikroE Click boards:
You can find pre-compiled device tree overlays on the default Digi Embedded Yocto precompiled images, inside the linux partition.
Check Device tree overlays mechanism for instructions on loading device tree overlays.
Use the mikroBUS™ socket
How you use a Click board connected on the mikroBUS™ socket depends on the type of interface and its driver. The following example describes how to use the Accel2 Click board from user space.
Usage example: Accelerometer
The device tree support for the Accel2 Click is added via a device tree overlay. To load the overlay, use the following command in U-Boot:
=> setenv overlays _ov_board_mikroe-accel2-click_ccimx93-dvk.dtbo,${overlays}
=> boot
Check the kernel log to verify that the Accel2 Click module was detected. Message may vary based on your kernel version and MikroE Click board, so use a generic grep to identify it:
# dmesg | grep iio
[ 5.986192] iio iio:device1: interrupts on the rising edge
To access the Accel2 Click module from user space, use the following commands (where N is the index of your device):
# cd /sys/bus/iio/devices/iio\:device__N__/
# grep "" in_accel_*_raw
in_accel_x_raw:24
in_accel_y_raw:9
in_accel_z_raw:1010