In order to read multiple bytes, it is necessary to assert the most significant bit of the subaddress field. In other words, SUB(7) must be equal to 1, while SUB(6-0) represents the address of the first register to be read.
The start address of the read (subaddress ) must be I3G4250D_OUT_X_L | 0x80:
ret = i3g4250d_read_reg(ctx, I3G4250D_OUT_X_L | 0x80, buff, 6);
This works in my application.
Note: connection interface - I2C. For transmission used HAL function HAL_I2C_Mem_Write
Device part numbers
i3g4250d
Type of bug
Driver. File i3g4250d_reg.c
Describe the bug
I found an incorrect multiple byte reading in function
int32_t i3g4250d_angular_rate_raw_get(stmdev_ctx_t *ctx, int16_t *val)
:I3G4250D datasheets DS10938 page 23:
The start address of the read (subaddress ) must be
I3G4250D_OUT_X_L | 0x80
:This works in my application.
Note: connection interface - I2C. For transmission used
HAL function HAL_I2C_Mem_Write