I'm using an Adafruit Feather 328P which can be used as an Arduino Pro Mini. On first uploading an ethernet sketch from a raspberry pi 4b, it responded with programmer not responding but it uploaded the sketch anyway.
Now when I try to upload with arduino-cli:
arduino-cli upload --port /dev/ttyUSB0 --fqbn arduino:avr:pro:cpu=8MHzatmega328 Blink
I get:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x0a
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x5b
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x77
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x65
Failed uploading: uploading error: exit status 1
the first few bytes of which correspond with the setup() output of the sketch:
if (ether.begin(sizeof Ethernet::buffer, mymac, SS) == 0)
Serial.println(F("Failed to access Ethernet controller"));
sudo screen /dev/ttyUSB0 57600
[webClient]
Failed to access Ethernet controller
and the sketch runs normally showing output.
I tried to upload a blink sketch but uploading no longer works. The uploader just sees the Serial.println() output in setup().
Is there anything I can do "clear" the board?