UART0, UART1 and I2C0 utilization and Initialization

Hi, I need to use UART0, UART1 and I2C0 in my application. I initialized these in overlay file (attached). When, debug is run, it is observed that the I2C binding is not successful see attached image file. I am using UART0 and UART1 in asynchrounous mode.  The zypher.dts fie also is attached. 

   

Parents
  • Yes, I tried to initializae the I2C0 peripheral using

    void init_i2c_master()
    {
    dev_i2c = device_get_binding("I2C_0");
    if (dev_i2c == NULL) {
    printk("Failed to get I2C0 binding\n");
    return;
    }
    }

    after disable of UART1 using  

    void disable_uart1(){
    NRF_UARTE0->TASKS_STOPTX = 1;
    NRF_UARTE0->TASKS_STOPRX = 1;
    }

    but, I2C initilaize fail, when run Debug .. though build and Compile is successful.

Reply
  • Yes, I tried to initializae the I2C0 peripheral using

    void init_i2c_master()
    {
    dev_i2c = device_get_binding("I2C_0");
    if (dev_i2c == NULL) {
    printk("Failed to get I2C0 binding\n");
    return;
    }
    }

    after disable of UART1 using  

    void disable_uart1(){
    NRF_UARTE0->TASKS_STOPTX = 1;
    NRF_UARTE0->TASKS_STOPRX = 1;
    }

    but, I2C initilaize fail, when run Debug .. though build and Compile is successful.

Children
Related