electrical noise during tuning ETB causes full tune reset #775
this fix did not seem to work :(
This commit is contained in:
parent
7a857ae298
commit
14831e1da8
|
@ -22,7 +22,8 @@
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
bl : org = 0x08000000, len = 16k /* bootloader section */
|
bl : org = 0x08000000, len = 16k /* bootloader section */
|
||||||
flash0 : org = DEFINED(BOOTLOADER) ? 0x08008000 : 0x08000000, len = DEFINED(BOOTLOADER) ? 992k : 1024k
|
/* 1M minus 128k for first copy of tune minus another 128k since another sector for another copy of tune */
|
||||||
|
flash0 : org = DEFINED(BOOTLOADER) ? 0x08008000 : 0x08000000, len = DEFINED(BOOTLOADER) ? 736k : 768k
|
||||||
flash1 : org = 0x00000000, len = 0
|
flash1 : org = 0x00000000, len = 0
|
||||||
flash2 : org = 0x00000000, len = 0
|
flash2 : org = 0x00000000, len = 0
|
||||||
flash3 : org = 0x00000000, len = 0
|
flash3 : org = 0x00000000, len = 0
|
||||||
|
|
|
@ -47,10 +47,12 @@ extern engine_configuration_s *engineConfiguration;
|
||||||
/**
|
/**
|
||||||
* https://sourceforge.net/p/rusefi/tickets/335/
|
* https://sourceforge.net/p/rusefi/tickets/335/
|
||||||
*
|
*
|
||||||
* Address of second config copy, rounded to 4K. 4K is the page size is it?
|
* In order to preserve at least one copy of the tune in case of electrical issues address of second configuration copy
|
||||||
*
|
* should be in a different sector of flash since complete flash sectors are erased on write.
|
||||||
*/
|
*/
|
||||||
#define FLASH_ADDR_SECOND_COPY (FLASH_ADDR + ((PERSISTENT_SIZE + 4095) & 0xFFFFF000))
|
#ifndef FLASH_ADDR_SECOND_COPY
|
||||||
|
#define FLASH_ADDR_SECOND_COPY 0x080C0000
|
||||||
|
#endif
|
||||||
|
|
||||||
crc_t flashStateCrc(persistent_config_container_s *state) {
|
crc_t flashStateCrc(persistent_config_container_s *state) {
|
||||||
return calc_crc((const crc_t*) &state->persistentConfiguration, sizeof(persistent_config_s));
|
return calc_crc((const crc_t*) &state->persistentConfiguration, sizeof(persistent_config_s));
|
||||||
|
|
Loading…
Reference in New Issue