Fix EepromMcuReadBuffer: Read back from cache #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Read back information from cache instead of flash.
The cache contains the latest context, whereas
the flash is only updated periodically.
This could cause issues if the flash is not (yet) updated
while the context has been updated in the meantime and values are read
by LoRaMAC.
Therefore just read from flash initially after startup (EepromMcuInit())
and rely on write cache later.
This commit effectively makes commit e31d3c1
work for me and therefore is a fix. Previous attemps to use commit
e31d3c1... without this commit failed. Error message: "Duty cycle restricted".
The error message might not appear at the first startup, but will
appear if Raspberry Pi Pico is restarted and values from "EEPROM" /
Flash have been read.
Might be related to #14 and also affects #15