You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 16, 2022. It is now read-only.
Perhaps @dev-zzo can shed some light into this. I had to remove some similar code from his original repo sources to get things working correctly. I have a stub (with comments) for this point. Basically, I do not exactly understand why running the following code to initialize a new chunk of FRAM real estate to zero (or whatever it should be) freezes the AVR:
/* TODO: Why doesn't this work ??? -- It freezes the AVR chip when run !! */voidMemsetBlockBytes(uint8_t initValue, SIZET startBlock, SIZET numBlocks) {
BYTE fillerBuf[DESFIRE_EEPROM_BLOCK_SIZE];
memset(fillerBuf, initValue, DESFIRE_EEPROM_BLOCK_SIZE);
SIZET writeAddr = startBlock * DESFIRE_EEPROM_BLOCK_SIZE;
while(numBlocks > 0) {
MemoryWriteBlock(fillerBuf, writeAddr, MIN(DESFIRE_EEPROM_BLOCK_SIZE, numBlocks));
writeAddr += DESFIRE_EEPROM_BLOCK_SIZE / sizeof(SIZET);
numBlocks -= DESFIRE_EEPROM_BLOCK_SIZE;
}
}
My best estimate is that things need to be aligned along block (defined at 32 bytes here) sizes. But then this can cause many an issue with having to write jagged data.
Why doesn't this work? I guess I should tag/ask @ceres-c too since he does so much of the development and PR merging over at emsec. A solution to this may very well stabilize some code that has gone a awry so far in my sources!
Perhaps @dev-zzo can shed some light into this. I had to remove some similar code from his original repo sources to get things working correctly. I have a stub (with comments) for this point. Basically, I do not exactly understand why running the following code to initialize a new chunk of FRAM real estate to zero (or whatever it should be) freezes the AVR:
My best estimate is that things need to be aligned along block (defined at 32 bytes here) sizes. But then this can cause many an issue with having to write jagged data.
Why doesn't this work? I guess I should tag/ask @ceres-c too since he does so much of the development and PR merging over at emsec. A solution to this may very well stabilize some code that has gone a awry so far in my sources!
Thanks for the input. :)