cancel
Showing results for 
Search instead for 
Did you mean: 

about HAL_I2C_Mem_Read()

Ukazu
Associate III

I want to read the general accelerometer register of the I2C interface.

I think it can be achieved by using HAL_I2C_Mem_Read ().

I set the second argument DevAddress to the value of the accelerometer slave address shifted left by 1 bit.

This is a HAL rule.

At this time, is it unnecessary to set bit0 of DevAddress to 1?

At the time of Read operation, I think that it is necessary to set bit0 to 1 together with the slave address.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi. Bit0 of DevAddress set to 1 by HAL driver. You must just pass slave address shifted left by 1 to function.

View solution in original post

2 REPLIES 2

Hi. Bit0 of DevAddress set to 1 by HAL driver. You must just pass slave address shifted left by 1 to function.

Ukazu
Associate III

Thank you for looking at my question.

I understand your explanation.

I am writing a design document now.

I can continue writing!!!