Now when I am trying to send data from Master MCU to Slave I2C via using function LPI2C_DRV_MasterSendDataBlocking(with instance number which is 0, buffer for LED based on register map address for eg 0x02, 0x03, size, send stop true, timeout 100ms ) But here I can't see ...
calling LPI2C_DRV_MasterSendDataBlocking(INST_LPI2C1,buffer,1,false,1); The SCL might be held low by the slave. To check this, you could try disconnect the slave and then look at the SCL signal(if the signal is still low then the problems are caused by the master). Do you observe...
buf[0]=REG_Address;//Soft_I2C_Write(BHAdd, buf, 1, 1);statusCode =LPI2C_MasterSendDataBlocking(LPI2C_INSTANCE, buf,1,true, OSIF_WAIT_FOREVER); }// 读传感器函数floatBH1750_Read(void){ STATUS_T statusCode = STATUS_ERROR;uint8_tbuf[2];floattemp;//Soft_I2C_Read(BHAdd, buf, 2, 1)...
LPI2C_DRV_MasterSendData(INST_CFG_LPI2C_I2C_MASTER, TxBuffer, 1, 0); LPI2C_DRV_MasterReceiveData(INST_CFG_LPI2C_I2C_MASTER, RxBuffer, 1, 0) but when excuted finish the first sentence,the SCL will be always set low,and bus is busy,so the second sentence can't excuted,and i can‘...
LPI2C_DRV_MasterSendDataBlocking(INST_LPI2C0, masterTxBuffer, 2, true, OSIF_WAIT_FOREVER); xQueueSend( xQueue, &ulValueToSend, mainDONT_BLOCK ); }} 6. Compile and Start bebug ==> LED shoud be blink but does not caused by LPI2C_DRV_MasterSendDataBlocking function. ==> LPI2C_DRV...
LPI2C_DRV_MasterSendData(INST_CFG_LPI2C_I2C_MASTER, TxBuffer, 1, 0); LPI2C_DRV_MasterReceiveData(INST_CFG_LPI2C_I2C_MASTER, RxBuffer, 1, 0) but when excuted finish the first sentence,the SCL will be always set low,and bus is busy,so the second sentence can't excuted,and ...
LPI2C_DRV_MasterSendData(INST_CFG_LPI2C_I2C_MASTER, TxBuffer, 1, 0); LPI2C_DRV_MasterReceiveData(INST_CFG_LPI2C_I2C_MASTER, RxBuffer, 1, 0) but when excuted finish the first sentence,the SCL will be always set low,and bus is busy,so the second sentence can't excuted,and ...
if (master == NULL) { return LPI2C_STATUS_FAIL; // it return for here } /* mark transfer as blocking */ master->blocking = true; retVal = LPI2C_DRV_MasterSendData(instance, txBuff, txSize, sendStop); // can't run here, if I delete the below codes, it will jump to ISR inte...
lpi2c_master_state_t *master = g_lpi2cMasterStatePtr[instance]; // I can't find it where is used if (master == NULL) { return LPI2C_STATUS_FAIL; // it return for here } /* mark transfer as blocking */ master->blocking = true; retVal = LPI2C_DRV_MasterSendData(instance, txBu...