Skip to content

Commit

Permalink
experiment for attiny15 plus other stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
MX682X committed Nov 29, 2024
1 parent ae86708 commit f916ba3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/avrdude.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -3147,7 +3147,7 @@ programmer # pickit5_dw
prog_modes = PM_debugWIRE;
extra_features = HAS_VTARG_READ;
connection_type = usb;
baudrate = 200000; # dW default clock
baudrate = 125000; # default clock for ISP on switch
usbvid = 0x04d8;
usbpid = 0x9036, 0x9012, 0x9018; # PK5, PK4 (pic mode), snap (pic mode)
;
Expand Down
11 changes: 10 additions & 1 deletion src/pickit5.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,13 @@ static void pickit5_enable(PROGRAMMER *pgm, const AVRPART *p) {
mem->page_size = mem->size < 1024? mem->size : 1024;
mem->readsize = mem->size < 1024? mem->size : 1024;
}
if((mem = avr_locate_eeprom(p))) {
if (mem->mode == 0x04) {
mem->page_size = 0x04;
mem->readsize = 0x04;
mem->blocksize = 0x04;
}
}
}
if(both_xmegajtag(pgm, p) || both_pdi(pgm, p)) {
if((mem = avr_locate_flash(p))) {
Expand Down Expand Up @@ -1305,6 +1312,8 @@ static void pickit5_dw_switch_to_isp(const PROGRAMMER *pgm, const AVRPART *p) {
pmsg_error("Failed switching scripts, aborting.\n");
return;
}
pmsg_notice("Switched to ISP mode");
pickit5_set_sck_period(pgm, 1.0 / my.actual_pgm_clk);
pickit5_program_enable(pgm, p);
}
}
Expand Down Expand Up @@ -1607,7 +1616,7 @@ static int pickit5_read_prodsig(const PROGRAMMER *pgm, const AVRPART *p,
return 0; // debugWire
}
} else {
rc = -6; // Something went wrong
return 0; // part has no prodsig nor ReadConfigmem
}
}
if (rc >= 0) { // No errors, copy data
Expand Down

0 comments on commit f916ba3

Please sign in to comment.