diff Discovery/Src/data_exchange_main.c @ 421:3f7d80f37bfc ImprovmentNVM_2

Enable sequentionel writing of device data: DeviceData was always written to the start of the the DD ringbuffer causing everytime a sector erase delay (~200ms). To avoid this the ring buffer functionality has been activated. To be backward compatible the latest DD set will be written to DD ring buffer start at shutdown time. In case of a reset the firmware scans for the latest DD block and restores its content giving the same data consistency intervall (10 minutes) as the previous implementation without having the 200ms penality for sector erases
author ideenmodellierer
date Mon, 10 Feb 2020 19:25:09 +0100
parents b11e50415982
children 079f32a8e68c
line wrap: on
line diff
--- a/Discovery/Src/data_exchange_main.c	Mon Feb 10 19:15:27 2020 +0100
+++ b/Discovery/Src/data_exchange_main.c	Mon Feb 10 19:25:09 2020 +0100
@@ -640,7 +640,7 @@
 
 	if(dataLengthRead == 0)
 	{
-		ext_flash_write_devicedata();
+		ext_flash_write_devicedata(false);
 		return;
 	}
 
@@ -682,7 +682,7 @@
 	}
 	
 	DataEX_check_DeviceData	();
-	ext_flash_write_devicedata();
+	ext_flash_write_devicedata(false);
 }