Posted by Jordi Muñoz on September 15, 2009 at 11:00am
Finally i figure out the problem that was limiting the number of waypoints on ArduPilot. The issue was in several parts (Confiq. tool, Ardupilot code and Atmega328 fuse bits). Anyway is ready (i guess) and you can download the Confiq. Tool from here:Release.zip (Note that this Confiq. Tool is not HappyKillMore approved yet ;-) )The latest code for ArduPilot can be found here:http://code.google.com/p/ardupilot/About the fuse bits i guess SparkFun is using the same configuration used for the Atmegas168, and the Atmega328 is different. When i was trying to debug the EEPROM and tried to dump it with the ISP and it was clear (only 0xFF's). Then i checked the fuses and I discovered that the EEPROM protection was enabled and the Bootloader protection was disabled. So i guess some ArduPilot's will fail overtime and you will need to reprogram the Bootloader. Why? Because when you don't protect the bootloader section (the one used to upload the firmware via the serial port) may get corrupted in some scenarios. I will notify about the problem.Before posting this i took a brand new ArduPilot, i ripped off the pink plastic bag and i read the fuses, and yeap the same issue:
[UPDATE]: The official realease of the Cofiq Tool is here
Arduino IDE is not working so well.. You should do it with AVRstudio... Or if you have the AVRSPIII jsut download this file (is mine) Arduino328@16mhz.zip and double click on "firmware_arduino_328_16mhz.bat" and it will upload the bootloader, set the fuses and the lock bits for you!
It's in your Arduino folder: arduino-0017\hardware\bootloaders\atmega\ATmegaBOOT_168_atmega328.hex
But if you have an AVR programmer, Arduino can reload the bootloader for you. It's in the menu items. [Warning: there is a driver conflict between Atmel's AVRISPIII programmer and the TinyISP one that Adafruit sells. If you've been using the Atmel one, Arduino may not recognize it. In that case, if you have the TinyISP as well, use that, or just load the hex and set the fuses manually with AVRStudio.]
Yes, yesterday I erase my ATMega328, reupload arduino bootloader and set the lockbit fuses, but my STATS LED don't blinking. Also can't upload ArduPilot Codes. I think something wrong with the ATmegaBOOT_168_atmega328.hex. Then I try copy the bootloader from my original Arduino Board by READ the board using AVR Studio. After that reupload it to ardupilot board. Yes success!!. Now I can upload Ardupilot code BUT my ardupilot STATS LED start blinking/works only after one minute I plug the power source or after reset.
Comments
Thanks... lol ;-)
I forgot to mention that it will also cook your breakfast! ;-)
Arduino IDE is not working so well.. You should do it with AVRstudio... Or if you have the AVRSPIII jsut download this file (is mine) Arduino328@16mhz.zip and double click on "firmware_arduino_328_16mhz.bat" and it will upload the bootloader, set the fuses and the lock bits for you!
Regards
Then I get this msg :
avrdude: usbdev_open(): did not find any USB device "usb"
But if you have an AVR programmer, Arduino can reload the bootloader for you. It's in the menu items. [Warning: there is a driver conflict between Atmel's AVRISPIII programmer and the TinyISP one that Adafruit sells. If you've been using the Atmel one, Arduino may not recognize it. In that case, if you have the TinyISP as well, use that, or just load the hex and set the fuses manually with AVRStudio.]