Closed Heavy-Horses closed 1 year ago
Thanks for the hint @Heavy-Horses. I already found the origin of this issue. Since PR #319 all memory is cleared when a new configuration is set:
void ConfigurationSetById(ConfigurationEnum Configuration, bool appInitRunOnce) {
[...]
/* Blank memory scape slate for the newly set configuration */
MemoryClear();
@maxieds can we revert this without affecting your code?
@fptrs Sorry. I have been out sick for the last couple of weeks since moving to the desert. I still haven't setup my home machines, so I will be unable to test what the change does.
Some comments based on the code cited above and the corresponding memory code in the firmware:
MemoryRecall();
from here. ConfigurationSetById
was to initialize a new tag configuration to have blank data (or restore the previously saved state). But then again, this unintentionally introduced the issue at hand by me only testing DESFire with LOGMODE=LIVE
.CONFIG=MF_DESFIRE
gets restored correctly (UID and maybe structures depending on how thoroughly you want to test). This was kind of tricky to ensure. That's all I would really be worried about.
I've lost the ability to store card data to FRAM in all releases after Jul 08, 2022. I don't have this issue the June 29, 2022 release. All data except for setting data such as card type, button action led mode etc.. is lost after a power cycle.