asrock70
Full Member level 4
I want to use I2C EEPROM to store information such as engine hours and pneumatic valve actuation counts,
In connection with this, they have to solve two questions
1. Data Consistency Verification
The EEPROM used has a page size of 16 bytes. The data has 14 bytes, leave one in reserve and put CRC8 on the last one
When I look at the wiki, I see 9 different polynomials used for different versions of CRC8. It doesn't matter which one I use for the given purpose, but if I can choose, can one be marked as the most suitable for the given purpose?
When I was doing great work with CRC many years ago. I used the crc utility, which was able to enter the parameters of the ordered CRC and was able to generate the source code in C for the CRC calculation, it was able to calculate and verify the CRC. It was a Win32 console application. Now I can't find it on the internet. Can you advise?
2. Microchip states eeprom lifetime 1M writes, ST 4M . In any case, I don't want to do that, the EEPROM lasts for 10 years and then I don't care.
My mind
The MCU is powered by 24V voltage to control the valves.
The MCU monitors the voltage at 24V, if it drops below 18V it considers it a power loss, turns off all valves and writes the states of the counters into the EEPROM with an overview, it should be able to do this within 10ms, after which the capacitors in the 24V/5V converter and the LDO should provide energy for the MCU 3.3V
The states of the counters will be written to the EEPROM on a jumper in two pages, and if the CRC does not match, the older version of the writing will always be.
Any better idea?
In connection with this, they have to solve two questions
1. Data Consistency Verification
The EEPROM used has a page size of 16 bytes. The data has 14 bytes, leave one in reserve and put CRC8 on the last one
When I look at the wiki, I see 9 different polynomials used for different versions of CRC8. It doesn't matter which one I use for the given purpose, but if I can choose, can one be marked as the most suitable for the given purpose?
When I was doing great work with CRC many years ago. I used the crc utility, which was able to enter the parameters of the ordered CRC and was able to generate the source code in C for the CRC calculation, it was able to calculate and verify the CRC. It was a Win32 console application. Now I can't find it on the internet. Can you advise?
2. Microchip states eeprom lifetime 1M writes, ST 4M . In any case, I don't want to do that, the EEPROM lasts for 10 years and then I don't care.
My mind
The MCU is powered by 24V voltage to control the valves.
The MCU monitors the voltage at 24V, if it drops below 18V it considers it a power loss, turns off all valves and writes the states of the counters into the EEPROM with an overview, it should be able to do this within 10ms, after which the capacitors in the 24V/5V converter and the LDO should provide energy for the MCU 3.3V
The states of the counters will be written to the EEPROM on a jumper in two pages, and if the CRC does not match, the older version of the writing will always be.
Any better idea?