Codeplug EEPROM 128 byte alignment when uploading from CPS
Posted: Tue May 19, 2020 12:20 pm
I have looked at function WriteEEPROM() in OpenGD77Form.cs. The function uploads EEPROM data to GD-77 in chunks of MAX_TRANSFER_SIZE (32 bytes) but on every 128 byte boundary it begins a new chunk.
Why is this necessary? If we begin a new chunk every 32 bytes, a new chunk will be started every 128 bytes as well?
One EEPROM block begins at 0x00E0 which is not aligned on a 128 byte boundary. The other EEPROM start address is 0x7500 which is aligned on a 128 byte boundary. They both are aligned on 32 byte boundaries.
Flash memory upload uses "prepare", "send" and "write" operations to update the flash memory in 4096 byte blocks. For EEPROM there are no "prepare" or "write" operations, just "send".
Why is this necessary? If we begin a new chunk every 32 bytes, a new chunk will be started every 128 bytes as well?
One EEPROM block begins at 0x00E0 which is not aligned on a 128 byte boundary. The other EEPROM start address is 0x7500 which is aligned on a 128 byte boundary. They both are aligned on 32 byte boundaries.
Flash memory upload uses "prepare", "send" and "write" operations to update the flash memory in 4096 byte blocks. For EEPROM there are no "prepare" or "write" operations, just "send".