Mercurial > public > ostc4
diff Small_CPU/Src/scheduler.c @ 488:9eeab3fead8f
Added "I2C_DeInit();" in hardware detection routines. It's the recommended way
to do and solves potential issues with older OSTC4 hardware generations.
Increased RTE and RTE required numbers
updated "Current build"
author | heinrichsweikamp |
---|---|
date | Sat, 27 Jun 2020 18:40:32 +0200 |
parents | 4b000e2386c2 |
children | 3328189786e7 |
line wrap: on
line diff
--- a/Small_CPU/Src/scheduler.c Tue May 26 19:27:07 2020 +0000 +++ b/Small_CPU/Src/scheduler.c Sat Jun 27 18:40:32 2020 +0200 @@ -640,7 +640,12 @@ if(global.I2C_SystemStatus != HAL_OK) { MX_I2C1_TestAndClear(); + HAL_Delay(100); + I2C_DeInit(); + HAL_Delay(100); MX_I2C1_Init(); + HAL_Delay(100); + init_pressure(); } } @@ -876,7 +881,12 @@ if(global.I2C_SystemStatus != HAL_OK) { MX_I2C1_TestAndClear(); + HAL_Delay(100); + I2C_DeInit(); + HAL_Delay(100); MX_I2C1_Init(); + HAL_Delay(100); + if(global.I2C_SystemStatus == HAL_OK) { init_pressure(); @@ -1036,7 +1046,12 @@ if(global.I2C_SystemStatus != HAL_OK) { MX_I2C1_TestAndClear(); + HAL_Delay(100); + I2C_DeInit(); + HAL_Delay(100); MX_I2C1_Init(); + HAL_Delay(100); + if((global.I2C_SystemStatus == HAL_OK) && (!is_init_pressure_done())) {