2016-05-30 11:32 PM
Hi,
I'm trying to read register in my accelerometer FXOS8700. I'm using code below on STM32L476:uint8_t FXOS8700_ReadReg(uint8_t reg) {
uint8_t value=0;
HAL_I2C_Master_Transmit(&hi2c1, FXOS8700CQ_SLAVE_ADDR, ®, 1, 100);
HAL_I2C_Master_Receive(&hi2c1, FXOS8700CQ_SLAVE_ADDR, &value, 1, 100);
return value;
}
HAL library generate STOP between transmit and receive function. I think this is my problem, because in FXOS8700 datasheet STOP is only on the end of whole operation.
Is it possible to disable this STOP signal between transmit and receive function ?
2016-06-01 03:02 AM
Hi robert.o,
Usage of functions HAL_I2C_Mem_Read and HAL_I2C_Mem_Write (I2C driver) or the ones available in SMBUS driver may be helpful for you.I recommend you to review them.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.