Thanks for this helpfull code!
My bus got stuck when using the lib, probably this topic. I had to protect the read/write operations from interrupts, then it worked, example:
void MPU6050_Writebytes(uint8_t reg_addr, uint8_t len, uint8_t* data)
{
__disable_irq();
HAL_I2C_Mem_Write(&hi2c1, MPU6050_ADDR, reg_addr, I2C_MEMADD_SIZE_8BIT, data, len, 1);
__enable_irq();
}
BR, BastelBaus
Thanks for this helpfull code!
My bus got stuck when using the lib, probably this topic. I had to protect the read/write operations from interrupts, then it worked, example:
BR, BastelBaus