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.

CC1310使用I2C讀取Sensor數據

Other Parts Discussed in Thread: CC1310

因為CC1310沒有I2C的例程,找了CCS裡面有相關I2C的範例,

路徑如下

C:\ti\tirtos_cc13xx_cc26xx_2_16_01_14\products\tidrivers_cc13xx_cc26xx_2_16_01_13\packages\ti\mw\sensors

所以用了SensorI2C.c來做為I2C的讀寫接口,

但是遇到寫了I2C地址和REG後,SCL會持續拉低,無法讀取資料,

請問是發生什麼問題?

附上使用代碼及訊號截圖


#define LPS22HB_ADDRESS 0xBA
#define LPS22HB_REG_WHOAMI 0xB1

int main(void)
{
uint8_t rxBuf[5];
/* Call board init functions. */
Board_initGeneral();

SensorI2C_open();
SensorI2C_select(SENSOR_I2C_0, (LPS22HB_ADDRESS>>1));
SensorI2C_readReg(LPS22HB_REG_WHOAMI, rxBuf, 1);

/* Start BIOS */
BIOS_start();

return (0);
}