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 very much!!! I now understand how it works.I have one more question.
config SLM_TWI bool "Access TWI interface with SLM AT command" select I2C default y if "$(dt_nodelabel_enabled,i2c0)" || \ "$(dt_nodelabel_enabled,i2c1)" || \ "$(dt_nodelabel_enabled,i2c2)" || \ "$(dt_nodelabel_enabled,i2c3)"How to enable "dt_nodelabel_enabled,i2c0 ".I didn't find a reference.
See zephyr/scripts/kconfig/kconfigfunctions.py#L124-L136.
You enable it by setting the "okay" as from my last post.
status = "okay";
Regards,
Sigurd Hellesvik
thank you.
I tried the following.

Either i2c0 or i2c1 is enabled but i2c2 is enabled.Am I still wrong somewhere?

Hi Sigurd Hellesvik:
This is the project I built, and it seems that I2C is not working after running.
Hi
The overlay file will not be added just because you have it in the same folder.
See Set devicetree overlays for how to set it.
Regards,
Sigurd Hellesvik
Hi
The overlay file will not be added just because you have it in the same folder.
See Set devicetree overlays for how to set it.
Regards,
Sigurd Hellesvik