1
\$\begingroup\$

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

\$\endgroup\$
3
  • \$\begingroup\$ Albeit a few years old now, but it comes with lots of useful info: arduino.stackexchange.com/questions/17/… \$\endgroup\$
    – MiNiMe
    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
    Oct 17, 2023 at 20:56
  • \$\begingroup\$ @MiNiMe thanks. My problem is solved now \$\endgroup\$
    – Gary Allen
    Oct 17, 2023 at 21:15

1 Answer 1

0
\$\begingroup\$

The solution was trivial - I hadn't connected a 10k pullup from reset to 3.3V. Everything works fine now

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.