I2C liaison

I am looking for a good document to establish an I2C connection between the nRF5340 and another microcontroller. I am using VS Code and the Nordic SDK. Unfortunately, the tutorials and documentation from Nordic are terribly bad. Can you help me?

Parents Reply
  • Hi,

    Yes I did.
    One of my first problem is the following one, here under.

    On my main.c I put this code :
    #include <zephyr/kernel.h>

    #include <zephyr/drivers/i2c.h>
    #define I2C0_NODE DT_NODELABEL(i2c0)

    int main(void)
    {
        static const struct i2c_dt_spec dev_i2c = I2C_DT_SPEC_GET_ON_I2C(I2C0_NODE);
            return 0;
    }
     
    On my prj.conf, this :
    CONFIG_I2C=y

    And on my .overlay file, I put this :
    i2c0: i2c0@03 {

        label ="MSP"
        reg = < 0x03 >;
    };

    I don't want to appear rought, but in my opinion, I find that these lessons are kind of poor and poorly explained.

    Regards

Children
Related