Arduino Uno motor.ino bad_fuses - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17) +--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18) +--- Thread: Arduino Uno motor.ino bad_fuses (/showthread.php?tid=2268) |
Arduino Uno motor.ino bad_fuses - jamos.tan@gmail.com - 2020-01-25 I am using an arduino nano with pypilot and it works fine. I am using a motor controller that fits directly onto an original arduino Uno, so I flashed it with motor.ino Another pro of the UNO is that they have mounting holes, and the NANO does not. I am getting the BAD_FUSES flag, the same on you sometimes get when you have a non original clone of the nano. I order some more UNO's just to be sure it was indeed original, so I have the feeling it is indeed original but that I now have to deal with the efuses. In the past I have already tried resetting fuses on a nano, which I am scared to do again now (broke too many...) Can somebody help me answer these questions? Thanks in advance! - How do I read the fuses of the UNO? - Can I put those values somewhere in the code of motor.ino? - Is setting the efuses the only way to correct the issue? - What are the exact steps of setting the efuses in a UNO so that the BAD_FUSES flag is removed? - Is the BAD_FUSES flag blocking? - Is there an alternative sollution to "bypass" the bad fuses flag? Hope someone can help! Thanks! Jamos RE: Arduino Uno motor.ino bad_fuses - seandepagnier - 2020-01-25 The fuses are read in motor.ino Yes, look where it sets the BAD_FUSES flag, and probably you want to use ifdefs for your processor. You might want to compare what the fuse differences actually are. You can set fuses with avrdude, it's documented in the README The BAD_FUSES is a warning. Mostly if the BOD isn't enabled the memory eventually will get corrupted. You could ignore it/comment it out fix the fuses etc.. RE: Arduino Uno motor.ino bad_fuses - jamos.tan@gmail.com - 2020-01-28 Thanks Sean. Tried reading the fuses with AVRDUDE on the terminal using: avrdude -c avrisp -b 19200 -P /dev/ttyUSB0 -u -p m328p -U hfuse:r:-:h -U lfuse:r:-:h -U efuse:r:-:h -U lock:r:-:h My arduino is on /dev/ttyUSB0 (checked in openplotter) but it gives me the error: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 Thought I'd unassign the Arduino from "Pypilot" to "None" in the serial tab and do a sudo reboot, but this has no effect. After knowing for sure I use the correct serial port, I thought maybe it is the baudrate. Changed this from 19200 to 57600 but also not effect. Any idea's? RE: Arduino Uno motor.ino bad_fuses - jamos.tan@gmail.com - 2020-01-28 Sorry, my bad. Needed two ATMEGA processors to read the fuses. Worked now. Ok, my fuse settings are: Code: Reading | ################################################## | 100% 0.07s And in the motor.ino I found: Code: // read fuses, and report this as flag if they are wrong 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 RE: Arduino Uno motor.ino bad_fuses - seandepagnier - 2020-01-29 it is confusing because avrdude reports different values from what is read in the program. The difference is the bits you can't set. From what I can tell your hfuse is de and should be da, but maybe you have a larger bootloader?? In this case you can just ignore the BAD_FUSES flag or change it the code so it looks for de RE: Arduino Uno motor.ino bad_fuses - jamos.tan@gmail.com - 2020-01-29 Thanks! Changed da to de in motor.ino, bad fuses flag is gone and pypilot running SYNC. |