2020-01-28, 03:58 PM
(This post was last modified: 2020-01-28, 04:09 PM by jamos.tan@gmail.com.)
Sorry, my bad. Needed two ATMEGA processors to read the fuses. Worked now.
Ok, my fuse settings are:
And in the motor.ino I found:
So, before I make any mistakes, what should the code look like?
Or should I rather change the fuses on the Arduino itself?
If I should change the fuses on the arduino, would this mean flashing to these values?
0xda
0xff
0x5
0xf
Ok, my fuse settings are:
Code:
Reading | ################################################## | 100% 0.07s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading hfuse memory:
Reading | ################################################## | 100% 0.01s
avrdude: writing output file "<stdout>"
0xde
avrdude: reading lfuse memory:
Reading | ################################################## | 100% 0.02s
avrdude: writing output file "<stdout>"
0xff
avrdude: reading efuse memory:
Reading | ################################################## | 100% 0.02s
avrdude: writing output file "<stdout>"
0xfd
avrdude: reading lock memory:
Reading | ################################################## | 100% 0.02s
avrdude: writing output file "<stdout>"
0xf
And in the motor.ino I found:
Code:
// read fuses, and report this as flag if they are wrong
uint8_t lowBits = boot_lock_fuse_bits_get(GET_LOW_FUSE_BITS);
uint8_t highBits = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS);
uint8_t extendedBits = boot_lock_fuse_bits_get(GET_EXTENDED_FUSE_BITS);
// uint8_t lockBits = boot_lock_fuse_bits_get(GET_LOCK_BITS); // too many clones don't set lock bits and there is no spm
if(lowBits != 0xFF || highBits != 0xda ||
(extendedBits != 0xFD && extendedBits != 0xFC)
// || lockBits != 0xCF // too many clones don't set lock bits and there is no spm
)
flags |= BAD_FUSES;
So, before I make any mistakes, what should the code look like?
Or should I rather change the fuses on the Arduino itself?
If I should change the fuses on the arduino, would this mean flashing to these values?
0xda
0xff
0x5
0xf