Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed READ EEPROM in stk500v2 bootloader #6456

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions hardware/arduino/avr/bootloaders/stk500v2/stk500boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,10 +1063,13 @@ int main(void)
else
{
/* Read EEPROM */
uint16_t ii = address >> 1;
do {
EEARL = address; // Setup EEPROM address
EEARH = ((address >> 8));
address++; // Select next EEPROM byte
EEARL = ii; // Setup EEPROM address
EEARH = ((ii >> 8));
address += 2; // Select next EEPROM byte
ii++;

EECR |= (1<<EERE); // Read EEPROM
*p++ = EEDR; // Send EEPROM data
size--;
Expand Down