changeset 100:b364c75005bb kittz

Stable.fix.
author Dmitry Romanov <kitt@bk.ru>
date Tue, 27 Nov 2018 12:59:56 +0300
parents 6a2308b9a3d4
children 83feba2ad1c3
files Discovery/Src/settings.c Discovery/Src/t9.c Small_CPU/Src/baseCPU2.c Small_CPU/Src/i2c.c Small_CPU/Src/scheduler.c ostc4pack/OSTC4_Firmware.bin ostc4pack/OSTC4_RTE.bin ostc4pack/OSTC4_RTE_upload.bin ostc4pack/OSTC4_firmware_upload.bin
diffstat 9 files changed, 31 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/settings.c	Mon Nov 26 15:25:52 2018 +0300
+++ b/Discovery/Src/settings.c	Tue Nov 27 12:59:56 2018 +0300
@@ -55,7 +55,7 @@
 {
     .versionFirst   = 1,
     .versionSecond 	= 4,
-    .versionThird   = 6,
+    .versionThird   = 5,
     .versionBeta    = 2,
 
     /* 4 bytes with trailing 0 */
--- a/Discovery/Src/t9.c	Mon Nov 26 15:25:52 2018 +0300
+++ b/Discovery/Src/t9.c	Tue Nov 27 12:59:56 2018 +0300
@@ -678,7 +678,7 @@
             // Wechseltiefe
             if(pGasLine[gasId].depth_meter)
             {
-                textpointer += snprintf(&text[textpointer],6,"\t%u m",pGasLine[gasId].depth_meter);
+
             }
             GFX_write_string(&FontT42, &t9cY0free, text, gasId);
         }
--- a/Small_CPU/Src/baseCPU2.c	Mon Nov 26 15:25:52 2018 +0300
+++ b/Small_CPU/Src/baseCPU2.c	Tue Nov 27 12:59:56 2018 +0300
@@ -162,13 +162,19 @@
 
 // SHALL LOAD AT 0x08000000 + 0x00005000 = 0x08005000.
 // See CPU2-RTE.ld
-const SFirmwareData cpu2_FirmwareData __attribute__(( section(".firmware_data") ))
-= { .versionFirst = 1, .versionSecond = 5, .versionThird = 2, .versionBeta = 0,
+const SFirmwareData cpu2_FirmwareData __attribute__(( section(".firmware_data") ))= {
+		.versionFirst = 1,
+		.versionSecond = 5,
+		.versionThird = 2,
+		.versionBeta = 0,
 
 /* 4 bytes with trailing 0 */
-.signature = "mh",
+		.signature = "mh",
 
-.release_year = 18, .release_month = 7, .release_day = 29, .release_sub = 0,
+		.release_year = 18,
+		.release_month = 7,
+		.release_day = 29,
+		.release_sub = 0,
 
 		/* max 48 with trailing 0 */
 		//release_info ="12345678901234567890123456789012345678901"
--- a/Small_CPU/Src/i2c.c	Mon Nov 26 15:25:52 2018 +0300
+++ b/Small_CPU/Src/i2c.c	Tue Nov 27 12:59:56 2018 +0300
@@ -69,9 +69,9 @@
 {
 	I2cHandle.Instance             = I2Cx;
   I2cHandle.Init.AddressingMode  = I2C_ADDRESSINGMODE_7BIT;
-  I2cHandle.Init.ClockSpeed      = 100000;//400000;
+  I2cHandle.Init.ClockSpeed      = 400000;//400000;
   I2cHandle.Init.DualAddressMode = I2C_DUALADDRESS_DISABLED;
-  I2cHandle.Init.DutyCycle       = I2C_DUTYCYCLE_2;
+  I2cHandle.Init.DutyCycle       = I2C_DUTYCYCLE_16_9;
   I2cHandle.Init.GeneralCallMode = I2C_GENERALCALL_DISABLED;
   I2cHandle.Init.NoStretchMode   = I2C_NOSTRETCH_DISABLED;
   I2cHandle.Init.OwnAddress1     = 0x01;
@@ -80,13 +80,15 @@
 
 	global.I2C_SystemStatus = HAL_I2C_Init(&I2cHandle);
 	HAL_I2CEx_AnalogFilter_Config(&I2cHandle, I2C_ANALOGFILTER_ENABLED);
+	HAL_I2CEx_ConfigDigitalFilter(&I2cHandle,0x0F);
+
 
 
 	global.dataSendToSlaveStopEval = 0;
-//	if(global.dataSendToSlavePending)
-//	{
-//		scheduleSpecial_Evaluate_DataSendToSlave();
-//	}
+	if(global.dataSendToSlavePending)
+	{
+		scheduleSpecial_Evaluate_DataSendToSlave();
+	}
 	return (HAL_StatusTypeDef)global.I2C_SystemStatus;
 }
 
@@ -118,10 +120,10 @@
 		I2C_Error_count();
 	}
 	global.dataSendToSlaveStopEval = 0;
-	if(global.dataSendToSlavePending)
-	{
-		scheduleSpecial_Evaluate_DataSendToSlave();
-	}
+//	if(global.dataSendToSlavePending)
+//	{
+//		scheduleSpecial_Evaluate_DataSendToSlave();
+//	}
 	return (HAL_StatusTypeDef)global.I2C_SystemStatus;
 }
 
@@ -141,10 +143,10 @@
 	}
 
 	global.dataSendToSlaveStopEval = 0;
-	if(global.dataSendToSlavePending)
-	{
-		scheduleSpecial_Evaluate_DataSendToSlave();
-	}
+//	if(global.dataSendToSlavePending)
+//	{
+//		scheduleSpecial_Evaluate_DataSendToSlave();
+//	}
 	
 	return (HAL_StatusTypeDef)global.I2C_SystemStatus;
 }
@@ -168,9 +170,9 @@
 	global.dataSendToSlaveStopEval = 0;
 //	if(global.dataSendToSlavePending)
 //	{
-//
+//		scheduleSpecial_Evaluate_DataSendToSlave();
 //	}
-	scheduleSpecial_Evaluate_DataSendToSlave();
+
 	return (HAL_StatusTypeDef)localHALstatusReturn;
 }
 
--- a/Small_CPU/Src/scheduler.c	Mon Nov 26 15:25:52 2018 +0300
+++ b/Small_CPU/Src/scheduler.c	Tue Nov 27 12:59:56 2018 +0300
@@ -292,7 +292,7 @@
 //
 	copyPressureData();
 	battery_gas_gauge_get_data();
-	if(global.mode==MODE_CALIB)copyCompassData();
+	copyCompassData();
 	copyCnsAndOtuData();
 	copyTimeData();
 	copyBatteryData();
Binary file ostc4pack/OSTC4_Firmware.bin has changed
Binary file ostc4pack/OSTC4_RTE.bin has changed
Binary file ostc4pack/OSTC4_RTE_upload.bin has changed
Binary file ostc4pack/OSTC4_firmware_upload.bin has changed