SmartCAMPUSZCU / KETCube-fw

KETCube firmware
Other
1 stars 1 forks source link

Error in I2C communication results in unrecovered HAL deinitialisation. #2

Closed krvanek closed 5 years ago

krvanek commented 5 years ago

Describe the bug Error in I2C communication results in unrecovered HAL deinitialisation.

To Reproduce Steps to reproduce the behavior:

  1. Enabled HDC1080 module
  2. HDC1080 sensor not connected

Expected behavior KETCube I2C driver should handle error and leave the bus functional for other modules.

Additional context Function void ketCube_I2C_Error called by ketCube_I2C_WriteData or ketCube_I2C_ReadData de-initialises the HAL driver and calls ketCube_I2C_Init which increments the number of initialisation requests but doesn't reinitialise the HAL driver.

Suggestion: ketCube_I2C_Init should always check for HAL driver status and initialise the driver when needed.

belohoub commented 5 years ago

Hot-fixed by "c1e7085b7015191f1374627bdcb1de309a3c90b7" commit.