I am using freeRTOS on STM32F4x. I am reading MPU6050 MEMS sensor on I2C2 peripheral. When I am just in bare metal mode, the HAL_I2C_Mem_Read function works just fine and returns me the ID of the sensor. However, when i am running with freeRTOS this function is always returning me HAL_TIMEOUT.
As a side note, the interrupt service routine for calling freeRTOS context switching is different from HAL time base. in this case my Timer 7 is used for calling freeRTOS context switching related stuff, while systick handler is kept for HAL time base functionality.
Does someone have any idea why would this simply go wrong?
Bests, Junaid