Hi,
I am having CC2650 5XD package and a smartRF06 EVB. I am trying to interface LIS2DH,accelerometer from ST Micro with CC2650. I wrote code with sensortag code as reference, doxygen for I2C in tirtos folder, bsp_i2c.c and bsp_i2c.h.
I have skimmed through technical reference manual for cc26xx, SW developers User guide, from which I found the PRCM module should have clock for I2C.
I am trying to configure DIO_2 as I2C0_SDA and DIO_3 as I2C0_SCL. the interface being used is CC2650_I2C0. I tried changing the mux value using
/* Set IO muxing for the UART pins */
PINCC26XX_setMux(hPin, Board_I2C0_SDA0, IOC_PORT_MCU_I2C_MSSDA);
PINCC26XX_setMux(hPin, Board_I2C0_SCL0, IOC_PORT_MCU_I2C_MSSCL);
All the registers in I2C0 is null even after using I2c_open(), bsp_i2c_select() and i2cCC26XX_open() etc. and the code goes to some random location.
- If I2c_Handle is null, will the code never come back to the next line of execution? I believe that handle is not getting opened, as all regsiters are still null.
- Is it ok to initialize SDA and SCL pins in the boardgpioinittable() and initialize it using PIN_init()?
- Is there any sample code available?