Merge pull request #878 from MCUdude/fix-pkob-target-voltage
Fix Curiosity Nano target voltage
This commit is contained in:
commit
d054c68b19
|
@ -2326,9 +2326,8 @@ static int jtag3_set_vtarget(PROGRAMMER * pgm, double v)
|
||||||
utarg = (unsigned)(v * 1000);
|
utarg = (unsigned)(v * 1000);
|
||||||
|
|
||||||
if (jtag3_getparm(pgm, SCOPE_GENERAL, 1, PARM3_VTARGET, buf, 2) < 0) {
|
if (jtag3_getparm(pgm, SCOPE_GENERAL, 1, PARM3_VTARGET, buf, 2) < 0) {
|
||||||
avrdude_message(MSG_INFO, "%s: jtag3_set_vtarget(): cannot obtain V[aref]\n",
|
avrdude_message(MSG_INFO, "%s: jtag3_set_vtarget(): cannot obtain V[target]\n",
|
||||||
progname);
|
progname);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uaref = b2_to_u16(buf);
|
uaref = b2_to_u16(buf);
|
||||||
|
@ -2337,8 +2336,11 @@ static int jtag3_set_vtarget(PROGRAMMER * pgm, double v)
|
||||||
avrdude_message(MSG_INFO, "%s: jtag3_set_vtarget(): changing V[target] from %.1f to %.1f\n",
|
avrdude_message(MSG_INFO, "%s: jtag3_set_vtarget(): changing V[target] from %.1f to %.1f\n",
|
||||||
progname, uaref / 1000.0, v);
|
progname, uaref / 1000.0, v);
|
||||||
|
|
||||||
if (jtag3_setparm(pgm, SCOPE_GENERAL, 1, PARM3_VADJUST, buf, sizeof(buf)) < 0)
|
if (jtag3_setparm(pgm, SCOPE_GENERAL, 1, PARM3_VADJUST, buf, sizeof(buf)) < 0) {
|
||||||
|
avrdude_message(MSG_INFO, "%s: jtag3_set_vtarget(): cannot confirm new V[target] value\n",
|
||||||
|
progname);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,8 +97,8 @@ struct command cmd[] = {
|
||||||
{ "sig", cmd_sig, "display device signature bytes" },
|
{ "sig", cmd_sig, "display device signature bytes" },
|
||||||
{ "part", cmd_part, "display the current part information" },
|
{ "part", cmd_part, "display the current part information" },
|
||||||
{ "send", cmd_send, "send a raw command : %s <b1> <b2> <b3> <b4>" },
|
{ "send", cmd_send, "send a raw command : %s <b1> <b2> <b3> <b4>" },
|
||||||
{ "parms", cmd_parms, "display adjustable parameters (STK500 only)" },
|
{ "parms", cmd_parms, "display adjustable parameters (STK500 and Curiosity Nano only)" },
|
||||||
{ "vtarg", cmd_vtarg, "set <V[target]> (STK500 only)" },
|
{ "vtarg", cmd_vtarg, "set <V[target]> (STK500 and Curiosity Nano only)" },
|
||||||
{ "varef", cmd_varef, "set <V[aref]> (STK500 only)" },
|
{ "varef", cmd_varef, "set <V[aref]> (STK500 only)" },
|
||||||
{ "fosc", cmd_fosc, "set <oscillator frequency> (STK500 only)" },
|
{ "fosc", cmd_fosc, "set <oscillator frequency> (STK500 only)" },
|
||||||
{ "sck", cmd_sck, "set <SCK period> (STK500 only)" },
|
{ "sck", cmd_sck, "set <SCK period> (STK500 only)" },
|
||||||
|
|
Loading…
Reference in New Issue