This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2650 & Contiki, fail to use I2C

Other Parts Discussed in Thread: CC2650

I'm trying to enable the I2C on Contiki on a CC2650 using the sensortag example.

I've changed the pin mapping on the board.h to  IOID_0 and IOID_1 and check the initialisation, but the software loop indefinitely on the first attempt to send data on while(ti_lib_i2c_master_busy(I2C0_BASE));

Using the oscilloscope i can see nothing happens on these lines (they have external pullup resistors).

I've tried to use a resistor to bring the lines to 0V and shows that there are no short circuit on the hardware (that would force the lines at VCC).

I also tried alternate pin.

I went through the code and couldn't see any other code that would use these same pin.

I made a test function that I run before other initialization but the behavior remain the same.

I use the RSM package.

void board_i2c_test()
{
	slave_addr = 0x6A;
	board_i2c_wakeup();
	
	ti_lib_i2c_master_disable(I2C0_BASE);
	
    ti_lib_ioc_io_port_pull_set(BOARD_IOID_SDA, IOC_NO_IOPULL);
    ti_lib_ioc_io_port_pull_set(BOARD_IOID_SCL, IOC_NO_IOPULL);
    ti_lib_ioc_pin_type_i2c(I2C0_BASE, BOARD_IOID_SDA, BOARD_IOID_SCL);
    ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_SDA);
    ti_lib_ioc_pin_type_gpio_input(BOARD_IOID_SCL);
    
    /* Enable and initialize the I2C master module */
    ti_lib_i2c_master_init_exp_clk(I2C0_BASE, ti_lib_sys_ctrl_clock_get(),
                                   true);
	
    
    uint8_t wdata = 5;
    
    board_i2c_write_read(&wdata, 1, &wdata, 1); // loop indefinitely inside this function, nothing on the scope on the lines, remains to VCC

}

I don't know where else I can check at this point.