Farmduino 2.0 bringup

Thank you Klaus,
the issue I have caused by AVR chip’s default fuses - they run form internal calibrated RC oscillator at 1MHz by default.

I hope this could help to others… (or my selves in a future)

For atmega2560 - I was able to fix fuses for external 16MHz crystal resonator by providing clock on XTAL1 + Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer and flash correct fuses using ISP programmer (stk500v2).

For atmega16u2 I failed. I installed (maybe wrong) firmware
sudo dfu-programmer atmega16u2:1,17 flash /media/data/tmp/proj/farmduino/fw.ATmega16/Arduino-usbserial-atmega16u2-Uno-Rev3.hex

but definetly with default fuses. This caused the farmduino is visible on USB as
lsusb
Bus 001 Device 009: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM)

Unfortunately clock for serial port is slow (default fuses 1MHz instead of 16MHz external crystal). So it transmits data from the atmega2560 but by wrong speed. I did try all predefined speeds but I see only 0xFF data or some mess. I was even unable to recover fuses as for 2560 or attach ISP programmer. My HVSP failed for some reason also - it see always some random messy chip ID.

So order new chip, replace, attach USB with dfu-programmer, set fuses for 16MHz and fash the FW as you is probably the solution.

btw. external USB/RS232-5V convertor for arduino-pro-mini works well when attached to atmega2560.

I was also unable to connect arduino IDE to the farmbot, but I solved this by using arduino mega2560 as temporary target. Afterwards I download the binary using stk500 and flash on farmduino by stk500. I see no reason to spend more time for this issue now… maybe farmduino fw update will force me in future.

Best Regards, Jan

1 Like