Explain what the various SUFFER bits do

This commit is contained in:
MCUdude
2022-12-25 20:18:36 +01:00
parent 50708ef4d9
commit c5091c599a
2 changed files with 14 additions and 1 deletions

View File

@@ -1429,7 +1429,7 @@ static void jtag3_enable(PROGRAMMER *pgm, const AVRPART *p) {
return;
}
int jtag3_parseextparms(const PROGRAMMER *pgm, const LISTID extparms) {
static int jtag3_parseextparms(const PROGRAMMER *pgm, const LISTID extparms) {
LNODEID ln;
const char *extended_param;
int rv = 0;
@@ -1460,6 +1460,12 @@ int jtag3_parseextparms(const PROGRAMMER *pgm, const LISTID extparms) {
continue;
}
// SUFFER bits
// Bit 7 ARDUINO: Adds control of extra LEDs when set to 0
// Bit 6..3: Reserved (masked out with 0x78 in the code below)
// Bit 2 EOF: Agressive power-down, sleep after 5 seconds if no USB enumeration when set to 0
// Bit 1 LOWP: forces running at 1 MHz when bit set to 0
// Bit 0 FUSE: Fuses are safe-masked when bit sent to 1 Fuses are unprotected when set to 0
else if (matches(extended_param, "suffer") ) {
for(LNODEID ln=lfirst(pgm->id); ln; ln=lnext(ln)) {
if (matches(ldata(ln), "xplainedmini")) {

View File

@@ -1550,6 +1550,13 @@ static int stk500v2_jtag3_parseextparms(const PROGRAMMER *pgm, const LISTID extp
for (ln = lfirst(extparms); ln; ln = lnext(ln)) {
extended_param = ldata(ln);
// SUFFER bits
// Bit 7 ARDUINO: Adds control of extra LEDs when set to 0
// Bit 6..3: Reserved (masked out with 0x78 in the code below)
// Bit 2 EOF: Agressive power-down, sleep after 5 seconds if no USB enumeration when set to 0
// Bit 1 LOWP: forces running at 1 MHz when bit set to 0
// Bit 0 FUSE: Fuses are safe-masked when bit sent to 1 Fuses are unprotected when set to 0
if (strncmp(extended_param, "suffer", strlen("suffer")) == 0) {
for (LNODEID ln=lfirst(pgm->id); ln; ln=lnext(ln)) {
if (strncmp(ldata(ln), "xplainedmini", strlen("xplainedmini")) == 0) {