nrf5340dk net core connects sensor through i2c

Hello,

I'm now using nrf5340dk. I want to use its net core to connect ina219 through i2c. I knew that net core i2c is &i2c0, so I set the overlay file like follow,

&i2c0 {
    status = "okay";
    compatible = "nordic,nrf-twim";
    clock-frequency = <I2C_BITRATE_STANDARD>;
    pinctrl-0 = <&i2c0_default>;
    pinctrl-1 = <&i2c0_sleep>;
    pinctrl-names = "default", "sleep";

    ina219@40 {
        status = "okay";
        compatible = "ti,ina219";
        reg = <0x40>;
        brng = <0>;
        pg = <0>;
        sadc = <13>;
        badc = <13>;
        shunt-milliohm = <100>;
        lsb-microamp = <10>;
    };
};
In the app core, I can connect ina219 and read the data from it. However, in net core, it didn't work.
So I want to know that whether net core can connect sensor through i2c?
Parents
  • Hi,

    Can you elaborate why you want to do this? The problem is that doing this is very complicated, because you would need to pass data from the netcore to the appcore, and then back to the netcore using the host controller interface. It's only intended to run the BLE stack on the netcore.

    But to answer your question; You will likely need to add the pins in question to the overlay file for the appcore, such that control of the pins in questions are forwarded from the appcore to the netcore. If you look for "fwd" in the appcore board files you likely will find some mention already.

    Kenneth

  • Hello,

    Thank you for your response. I’m working on this project because I want to connect two sensors—ICM20948 and INA219—to the nRF5340DK and process their data simultaneously. To achieve this, I plan to utilize the dual-core architecture of the nRF5340DK by assigning each sensor to a separate core: one to the application core and the other to the network core.

    I also have a few questions. What does "fwd" refer to? Additionally, why is it necessary to specify the pins in the overlay file for the application core? How does this approach help address my issue?

     

    Sincerely,

    Thomaddd 

Reply
  • Hello,

    Thank you for your response. I’m working on this project because I want to connect two sensors—ICM20948 and INA219—to the nRF5340DK and process their data simultaneously. To achieve this, I plan to utilize the dual-core architecture of the nRF5340DK by assigning each sensor to a separate core: one to the application core and the other to the network core.

    I also have a few questions. What does "fwd" refer to? Additionally, why is it necessary to specify the pins in the overlay file for the application core? How does this approach help address my issue?

     

    Sincerely,

    Thomaddd 

Children
Related