Re: Unibox - WIP 2020 EUzebox BOM
Posted: Sun Jul 26, 2020 12:46 pm
The seller of the programmer replied and suggested I use the -B 7 avrdude option and that seems to have fixed it. He said:
I had to use the -F switch to get it to work plus I've had no luck in setting the fuses, even when using -B 7 so I'm still not entirely convinced everything is OK. Would those current fuse values (E:FF, H:99, L:62) not allow me to boot or use the UB properly?
I got it to work by having no jumpers connected on the USBasp power jumper (JP21) and using the following command:JP1 is only used if you want to update the firmware of the USBasp itself.
If you're flashing a new microcontroller you'll need to set the bit clock using the -B flag to e.g. -B7 as new microcontrollers are clocked at 1 MHz and AVRDUDE expect it to be at least 4MHz. Alternatively, it should also work if you close JP3 which is used to select Slow-SCK.
Let me know if this works.
Code: Select all
$ sudo avrdude -v -c USBasp -P usb -p m644 -U flash:w:Bootloader5.hex -F -B 7
avrdude: Version 6.3
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/local/ISDADS/sgs548/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : USBasp
Setting bit clk period : 7.0
AVR Part : ATmega644
Chip Erase delay : 55000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 128 0 no 2048 8 0 9000 9000 0xff 0xff
flash 33 6 256 0 yes 65536 256 256 4500 4500 0xff 0xff
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: set SCK frequency to 93750 Hz
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9609 (probably m644)
avrdude: safemode: hfuse reads as 99
avrdude: safemode: efuse reads as FF
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: set SCK frequency to 93750 Hz
avrdude: reading input file "Bootloader5.hex"
avrdude: input file Bootloader5.hex auto detected as Intel Hex
avrdude: writing flash (65536 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 65536 bytes of flash written
avrdude: verifying flash memory against Bootloader5.hex:
avrdude: load data flash data from input file Bootloader5.hex:
avrdude: input file Bootloader5.hex auto detected as Intel Hex
avrdude: input file Bootloader5.hex contains 65536 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 65536 bytes of flash verified
avrdude: safemode: hfuse reads as 99
avrdude: safemode: efuse reads as FF
avrdude: safemode: Fuses OK (E:FF, H:99, L:62)
avrdude done. Thank you.