Raspberry pi and 3pi with Pololu AVR

Hi. I’m having issues using the USB AVR programmer with the Raspberry Pi Model B+. The serial connections show up as expected for the programmer, but it seems to have problems with the programmer.

Here is the command I used and the output.
me@witsend ~ $ avrdude -B1 -i1000 -p m328p -P /dev/ttyACM0 -c avrispv2 -U flash:w:test.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as F6
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as 4
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: stk500v2_command(): command failed
avrdude: reading input file "test.hex"
avrdude: input file test.hex auto detected as Intel Hex
avrdude: writing flash (2780 bytes):

Writing | | 0% 0.00savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ## | 4% 5.01savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ##### | 9% 10.02savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ####### | 13% 15.02savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ######### | 18% 20.03savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ############ | 23% 25.04savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ############## | 27% 30.04savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ################ | 32% 35.05savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ################## | 36% 40.06savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ##################### | 41% 45.06savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ####################### | 46% 50.07savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ######################### | 50% 55.08savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ############################ | 55% 60.09savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ############################## | 59% 65.09savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ################################ | 64% 70.09savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ################################### | 69% 75.10savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ##################################### | 73% 80.11savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ####################################### | 78% 85.11savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ######################################### | 82% 90.12savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ############################################ | 87% 95.13savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ############################################## | 92% 100.13savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ################################################ | 96% 105.14savrdude: stk500v2_ReceiveMessage(): timeout
Writing | ################################################## | 100% 110.15s

avrdude: 2780 bytes of flash written
avrdude: verifying flash memory against test.hex:
avrdude: load data flash data from input file test.hex:
avrdude: input file test.hex auto detected as Intel Hex
avrdude: input file test.hex contains 2780 bytes
avrdude: reading on-chip flash data:

Reading | | 0% 0.00savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ##### | 9% 5.01savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ######### | 18% 10.02savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ############## | 27% 15.03savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ################## | 36% 20.03savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ####################### | 46% 25.04savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ############################ | 55% 30.05savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ################################ | 64% 35.05savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ##################################### | 73% 40.06savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ######################################### | 82% 45.07savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ############################################## | 92% 50.08savrdude: stk500v2_ReceiveMessage(): timeout
Reading | ################################################## | 100% 55.08s

avrdude: verifying …
avrdude: verification error, first mismatch at byte 0x0000
0x33 != 0x00
avrdude: verification error; content mismatch

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: safemode: lfuse reads as 0
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: safemode: hfuse reads as BE
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: safemode: efuse reads as 6
avrdude: safemode: lfuse changed! Was f6, and is now 0
Would you like this fuse to be changed back? [y/n] y

then it loops

avrdude: stk500v2_cmd(): short reply, len = 0
avrdude: stk500v2_ReceiveMessage(): timeout

Any help or insight appreciated. I’m going to try and play around with it and get it working. Thanks!

Hello.

Could you try removing the -i1000 option from your AVRDUDE command? I suspect that option is setting the ISP frequency of the programmer to a very low speed and causing many commands to time out. The -B1 option is sufficient for setting the ISP frequency; it will set it to 1500 kHz on the Pololu USB AVR Programmer. It’s also possible that the -B requires a space after it, so you could try changing that option to -B 1.

–David