Fix JTAGICE mkII by removing the initialize call after CMD_CHIP_ERASE_ISP (#1172)

- The extra call to initialize() sends CMD_ENTER_PROGMODE_ISP causing a flash
   verification mismatch
This commit is contained in:
Cristiano De Alti 2022-11-22 02:17:19 +01:00 committed by GitHub
parent 02e02be6f9
commit c3acdccbe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -948,8 +948,10 @@ static int stk500v2_chip_erase(const PROGRAMMER *pgm, const AVRPART *p) {
memset(buf+3, 0, 4); memset(buf+3, 0, 4);
avr_set_bits(p->op[AVR_OP_CHIP_ERASE], buf+3); avr_set_bits(p->op[AVR_OP_CHIP_ERASE], buf+3);
result = stk500v2_command(pgm, buf, 7, sizeof(buf)); result = stk500v2_command(pgm, buf, 7, sizeof(buf));
usleep(p->chip_erase_delay); usleep(p->chip_erase_delay); // should not be needed
pgm->initialize(pgm, p); if (PDATA(pgm)->pgmtype != PGMTYPE_JTAGICE_MKII) { // skip for JTAGICE mkII (FW v7.39)
pgm->initialize(pgm, p); // should not be needed
}
pgm->pgm_led(pgm, OFF); pgm->pgm_led(pgm, OFF);