Connect STM32F103 to MPU9250 over I2C with HAL (ERROR)
okay, thank you brhans for your comment. I thought I had taken care of that but the clock line was pulled high to 3v3, now it works.
thank you very much!

I also changed this line

valt = ((int16_t)val &lt;&lt; 4) | (val &gt;&gt; 4);


to

valt = ((int16_t)buf[0] &lt;&lt; 8) | (buf[1]);