ncs v1.9.1
Reference nrf\applications\serial_lte_modem\src\twi
This example does not see how to configure the pin.so how to config SCK and SDA Pin?
Thanks!!!
ncs v1.9.1
Reference nrf\applications\serial_lte_modem\src\twi
This example does not see how to configure the pin.so how to config SCK and SDA Pin?
Thanks!!!
Hi
You can add them yourself, using the syntax seen in zephyr.dts for i2c2:
i2c2: arduino_i2c: i2c@a000 {
compatible = "nordic,nrf-twim";
#address-cells = < 0x1 >;
#size-cells = < 0x0 >;
reg = < 0xa000 0x1000 >;
clock-frequency = < 0x186a0 >;
interrupts = < 0xa 0x1 >;
status = "disabled";
label = "I2C_2";
sda-pin = < 0x1e >;
scl-pin = < 0x1f >;
Regards,
Sigurd Hellesvik
thank you.I wank to know i2c0,i2c1...which pin is used and why can't it be found.
It seems that the i2c of this is not used. Is there any other examples I can refer to.(Examples that seem easier to understand.)
Hi
You can set the pins for i2c0 and/or i2c1 by using Devicetree overlays.
Here is an example for an overlay file setting the pins for one of the i2c devices:
&i2c1 {
status = "okay";
sda-pin = < 12 >;
scl-pin = < 13 >;
};
Regards,
Sigurd Hellesvik