I've successfully burned a bootloader to my Atmega328p via the SPI interface, and then used this CH340 and a level converter to successfully upload code to the chip.
However, every time I upload code, and then try uploading a second time, I get the classic "stk500_getsync" error message, either with response 0x00 or 0xe0, saying the programmer is not in sync.
If I unplug my USB cable, wait 5 seconds, and then plug it back in, and can successfully upload new code. This is quote annoying, however, for development.
What could be the issue? I am using the Arduino framework and have tried both the Arduino IDE and PlatformIO
-
\$\begingroup\$ Albeit a few years old now, but it comes with lots of useful info: arduino.stackexchange.com/questions/17/… \$\endgroup\$MiNiMe– MiNiMe2023年10月17日 20:04:55 +00:00Commented Oct 17, 2023 at 20:04
-
\$\begingroup\$ With no schematics or other details, we don't know what could be the problem. For example, how do we know if you wired the MCU and USB UART correctly, or if you uploaded correct bootloader, or set the fuse bits correctly. Are there schematics of your device? And maybe this would better suit Arduino.SE since your problem is with Arduino. Have you tried if it works without Arduino? \$\endgroup\$Justme– Justme2023年10月17日 20:56:54 +00:00Commented Oct 17, 2023 at 20:56
-
\$\begingroup\$ @MiNiMe thanks. My problem is solved now \$\endgroup\$Gary Allen– Gary Allen2023年10月17日 21:15:28 +00:00Commented Oct 17, 2023 at 21:15
1 Answer 1
The solution was trivial - I hadn't connected a 10k pullup from reset to 3.3V. Everything works fine now