diff Small_CPU/Src/baseCPU2.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 edfc1a464b42
children 02e7e11fdbe8
line wrap: on
line diff
--- a/Small_CPU/Src/baseCPU2.c	Tue May 26 19:27:07 2020 +0000
+++ b/Small_CPU/Src/baseCPU2.c	Sat Jun 27 18:40:32 2020 +0200
@@ -164,7 +164,7 @@
 // See CPU2-RTE.ld
 const SFirmwareData cpu2_FirmwareData __attribute__(( section(".firmware_data") ))= {
 		.versionFirst = 2,
-		.versionSecond = 3,
+		.versionSecond = 4,
 		.versionThird = 0,
 		.versionBeta = 0,
 
@@ -172,8 +172,8 @@
 		.signature = "mh",
 
 		.release_year = 20,
-		.release_month = 2,
-		.release_day = 26,
+		.release_month = 6,
+		.release_day = 30,
 		.release_sub = 0,
 
 		/* max 48 with trailing 0 */
@@ -314,7 +314,11 @@
 		if (MX_I2C1_TestAndClear() == GPIO_PIN_RESET) {
 			MX_I2C1_TestAndClear(); // do it a second time
 		}
+		HAL_Delay(100);
+		I2C_DeInit();
+		HAL_Delay(100);
 		MX_I2C1_Init();
+		HAL_Delay(100);
 	}
 
 
@@ -328,7 +332,11 @@
 		if (MX_I2C1_TestAndClear() == GPIO_PIN_RESET) {
 			MX_I2C1_TestAndClear(); // do it a second time
 		}
+		HAL_Delay(100);
+		I2C_DeInit();
+		HAL_Delay(100);
 		MX_I2C1_Init();
+		HAL_Delay(100);
 		global.sensorError[SENSOR_PRESSURE_ID] = init_pressure();
 		global.I2C_SystemStatus = global.sensorError[SENSOR_PRESSURE_ID];
 	}