I just spent two long days trying everything I could think of to get the Pololu USB Programmer I just bought to work on my Mac with no success. It’s been a long learning curve because all this ISP and DFU programming for Arduoino/AVR chips is new to me.
I’ve got my MacBook Pro (2017 version I think) (the latest macOS Big Sur 11.5.2) connected to your older version (product 1300) USB AVR Programmer which is then connected to an Arduino Mega 2560 ISP header (trying both the m2560 main processor header and the m16u2 smaller processor header). I’ve now tested on both a “real” Arduino Mega and a real Arduino Uni, and a blue board (brand unknown) Mega and they all show the same problem.
I get tons of what seems to be communication errors like this from avrdude such as:
avrdude: ser_drain(): read error: Device not configured
avrdude: ser_send(): write error: Device not configured
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: Device not configured
avrdude: stk500v2_ReceiveMessage(): timeout
The errors are highly inconsistent and random. At times, it seems to work for a moment, then it gets errors and will print out 100’s of lines of these errors and fail. It works a little because I managed to mess up the programming of two different Arduions in my testing.
I eventually solved all my programs by not using the Pololu programmer. I bought a new Mega and Uni, and turned the Mega into an ISP programmer, and did all my programming with the Mega as ISP to solve my original need, and fix the damage done with my testing of the Pololu programmer.
I did all this because I replaced the ATMega16u2 chip on my Arduino Mega as an SMD soldering and repair learning exercise so, with a factory fresh 16u2, it needed to be configured and reprogrammed to work in the Arduino. All that turned out great, once I stopped wasting my time with the Pololu programmer.
Now that my boards are all working, I’m returning to try and understand what’s up with the Pololu programmer and see if I can make it work.
I’m using avrdude on my mac (the one that is built into the Arduino IDE app 1.8.18), which has avrdude Version 6.3-20190619.
avrdude works fine for communicating to the Mega as an ISP which I’ve used to do multiple programming tasks. Just not with the Pololu programmer.
The typical command I use to try and talk to the Pololu programmer is:
avrdude -C /usr/local/avr/etc/avrdude.conf -p m2560 -c avrispv2 -v -P /dev/tty.usbmodem003348711
The tty port is the lower number of the two (the second ending in 13).
Typical example of avrdude output with errors:
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/usr/local/avr/etc/avrdude.conf"
User configuration file is "/Users/curtwelch/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/tty.usbmodem003348711
Using Programmer : avrispv2
avrdude: ser_drain(): read error: Device not configured
AVR Part : ATmega2560
Chip Erase delay : 9000 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 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 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
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel AVR ISP V2
Programmer Model: STK500
avrdude: ser_send(): write error: Device not configured
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: Device not configured
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: Device not configured
The errors then repeat like the ones at the end for 100’s of lines as avrdude keeps trying to communicate with the programmer and is only getting errors. There are no time delays when it reports “timeout”. All these errors happen within a second.
I tried switching which USB port on the mac it was connected to. Rebooting the mac (some comments I found suggested that worked for someone else), tried using a different USB cable than the one supplied with the programmer, tried connecting it to different Arduinos, tried different baud rate settings (19200, 115200, 9600) and nothing seemed to work. I don’t have a different computer (like a Windows box) to test with.
Ah, and suddenly, one test run worked without error to read and report the status of the Mega and the fuse settings! But then trying again multiple times just now, back to the same errors???
The green light on the board comes on. The other LED is red, until I connect the ISP cable, then it will turn Yellow when there is power on the target board. That all seems to match the descriptions in your documentation.
The odd behavior however is that the tty ports will show up, but then a minute or two later, they vanish again, even though I have done nothing to the hardware. Then, without me doing anything, the tty ports return. The light stays yellow, but the programmer seems to be cycling and re-connecting to the Mac to define the tty ports, then turning off again.
And just now, while doing more testing, I got it to work again, with 19200 baud, and by unplugging the USB from the programmer, plugging it back in, then running avrdude multiple times right as it was first starting…
Does it even care about the baud rate or does it not matter because the USB never gets converted to a real serial signal anyway inside the programmer???
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/usr/local/avr/etc/avrdude.conf"
User configuration file is "/Users/curtwelch/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/tty.usbmodem003348711
Using Programmer : avrispv2
Overriding Baud Rate : 19200
AVR Part : ATmega2560
Chip Erase delay : 9000 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 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 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
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel AVR ISP V2
Programmer Model: STK500
Hardware Version: 15
Firmware Version Master : 2.10
Topcard : Unknown
Vtarget : 4.8 V
SCK period : 17.4 us
Varef : 0.0 V
Oscillator : 3.686 MHz
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as FD
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)
avrdude done. Thank you.
When trying to flash (the above was only reading), I have seen it start the flash writing, then getting the communication errors (device not configured type stuff), then bomb. That left my processor half-programmed and broken when it happened.
I can’t find others on the internet having his issue. So I’m a bit lost. There were issues back in 2010 very similar to this with Mac OSx having a compatibility issue with this Pololu programmer, but Apple seemed to have fixed that error and nothing I could find suggests the error had returned for others.
But maybe no one is using your old programmer anymore? I bought it last week without enough research to know that it was way outdated in your product line. I just knew I needed an ISP programmer and have used Pololu products in the past and was happen with them so I clicked the buy button.
Or maybe I have something odd installed in my Mac that is making the USB bug return for your product???
This feels to me to be a USB protocol issue between my Mac and your Pololu programmer. Feels like my Mac and the Pololu programmer keep losing connection which kills the link, then it gets restarted, and only if the USB device definition link stays up long enough for avrdude get a second to work before the USB device dies again.
Any suggestions as to what might be happening and how to fix it or how to chase down the issue?
Should I just bail on the old #1300 programmer and try your newest one? It would be nice to have one that works for future use.