# MiniCore uploading problems

**URL:** <https://forum.arduino.cc/t/minicore-uploading-problems/1285104>\
**Category:** Uploading\
**Created:** [July 25, 2024, 10:00am UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104 "2024-07-25T10:00:04Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![helihasko](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/helihasko/32/973435_2.png) [@helihasko](https://forum.arduino.cc/u/helihasko)\
**Post date:** [July 25, 2024, 10:00am UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/1 "2024-07-25T10:00:05Z")

</div>

Hi,

I have made a custom PCB with a 328pb and decided to use MiniCore by @MCUdude. I can upload the bootloader and the program without a bootloader through ISP, but serial programming is not working as intended. If I use an FTDI adapter, programming straight up doesn´t work at all (serial monitor does work). If I use a CP2102 adapter, it only works if I reset the board at a specific time, which is hard to hit.

I suspect this is some sort of problem with the urboot bootloader and the timing of the reset through the DTR pin. Has anyone encountered and solved this issue?

This is the output while uploading:

```arduino
avrdude: Version 7.2-arduino.1
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is C:\Users\HAU-NB_HLX03\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.2\avrdude.conf

         Using Port : COM5
         Using Programmer : urclock
         Overriding Baud Rate : 115200
avrdude urclock_getsync() warning: attempt 1 of 10: not in sync
avrdude urclock_getsync() warning: attempt 2 of 10: not in sync
avrdude urclock_getsync() warning: attempt 3 of 10: not in sync
avrdude urclock_getsync() warning: attempt 4 of 10: not in sync
avrdude urclock_getsync() warning: attempt 5 of 10: not in sync
avrdude urclock_getsync() warning: attempt 6 of 10: not in sync
avrdude urclock_getsync() warning: attempt 7 of 10: not in sync
avrdude urclock_getsync() warning: attempt 8 of 10: not in sync
avrdude urclock_getsync() warning: attempt 9 of 10: not in sync
avrdude urclock_getsync() warning: attempt 10 of 10: not in sync
avrdude urclock_recv() warning: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude main() error: unable to open programmer urclock on port COM5

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

```

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [July 25, 2024, 6:15pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/2 "2024-07-25T18:15:58Z")

</div>

> [@helihasko](#):
>
> I have made a custom PCB with a 328pb and decided to use MiniCore by @MCUdude. I can upload the bootloader and the program without a bootloader through ISP, but serial programming is not working as intended.

But it worked ok on your breadboard prototype?

---

<div class="post-metadata">

**Author:** ![helihasko](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/helihasko/32/973435_2.png) [@helihasko](https://forum.arduino.cc/u/helihasko)\
**Post date:** [July 26, 2024, 5:19am UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/3 "2024-07-26T05:19:39Z")

</div>

I have/had no breadboard prototype.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [July 26, 2024, 10:45am UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/4 "2024-07-26T10:45:32Z")

</div>

I have found the cause of the problem! Here it is:

> [@helihasko](#):
>
> I have/had no breadboard prototype.

---

<div class="post-metadata">

**Author:** ![david\_2018](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/david_2018/32/1013044_2.png) [@david\_2018](https://forum.arduino.cc/u/david_2018)\
**Post date:** [July 26, 2024, 10:55am UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/5 "2024-07-26T10:55:49Z")

</div>

You will need to post the schematic, it is much more likely that there is a problem with the circuitry on the RESET pin than with the bootloader.

---

<div class="post-metadata">

**Author:** ![helihasko](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/helihasko/32/973435_2.png) [@helihasko](https://forum.arduino.cc/u/helihasko)\
**Post date:** [July 26, 2024, 11:57am UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/6 "2024-07-26T11:57:12Z")

</div>

@PaulRB Very funny. 🙄

@david_2018 Here is the schematic. The reset circuit is the same as with the usual Arduino boards.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/f/c/e/fce7d5adde0e58755e18b1d8e3e4af33f87ed3e0.png)

I used the reference schematic from the MiniCore GitHub page:

 ![68747470733a2f2f692e696d6775722e636f6d2f4c72456f6b4f392e706e67](https://europe1.discourse-cdn.com/arduino/original/4X/d/0/8/d0873621c4ab8e5f483aef9042e61cbf0ab40841.jpeg)

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [July 26, 2024, 1:13pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/7 "2024-07-26T13:13:11Z")

</div>

> [@helihasko](#):
>
> Very funny.

But true!

Thanks for the schematic. I was going to ask if you had the cap and pull-up on the reset pin, because that might have explained the symptoms. But what you have shown looks good. That's how I have done it previously, using CP2102. I did not have to click reset button at all to upload code like that.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [July 26, 2024, 1:19pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/8 "2024-07-26T13:19:26Z")

</div>

I see you have no external crystal in your circuit (also like my circuits). Did you set to 8MHz internal clock before burning the bootloader?

---

<div class="post-metadata">

**Author:** ![helihasko](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/helihasko/32/973435_2.png) [@helihasko](https://forum.arduino.cc/u/helihasko)\
**Post date:** [July 26, 2024, 1:21pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/9 "2024-07-26T13:21:39Z")

</div>

I do have an external 16 MHz resonator. The Atmega otherwise works fine. My code runs just fine, only uploading through serial in the IDE is an issue.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [July 26, 2024, 1:28pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/10 "2024-07-26T13:28:17Z")

</div>

> [@helihasko](#):
>
> I do have an external 16 MHz resonator.

Ah, sorry, I missed it.

It's got built-in caps, right? I assume that's why it's shown with a ground connection. If not, and it's a 2-pin crystal, gotta have them caps!

---

<div class="post-metadata">

**Author:** ![helihasko](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/helihasko/32/973435_2.png) [@helihasko](https://forum.arduino.cc/u/helihasko)\
**Post date:** [July 26, 2024, 1:31pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/11 "2024-07-26T13:31:29Z")

</div>

Yes. That´s why I called it a resonator and not a crystal. 😉 It has 15 pF caps. P/N CSTNE16M0V53L000R0 if you want to look it up.

As I said, the microcontroller works just fine, I only have an issue with uploading through serial.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [July 26, 2024, 1:53pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/12 "2024-07-26T13:53:10Z")

</div>

Like @david_2018, it sounded like a reset circuit problem to me. But you have used the "standard" cap and pull-up, which has always worked well for me with CP2102, MiniCore, 328p 28-pin DIP.

Have you 'scoped-out the reset pin signal when you hit the upload button?

---

<div class="post-metadata">

**Author:** ![david\_2018](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/david_2018/32/1013044_2.png) [@david\_2018](https://forum.arduino.cc/u/david_2018)\
**Post date:** [July 26, 2024, 2:04pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/13 "2024-07-26T14:04:55Z")

</div>

Just want to verify that you did not upload a sketch via ISP, that will erase the bootloader. Does not seem to be the case here, since you can upload by manually resetting.

---

<div class="post-metadata">

**Author:** ![hmeijdam](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hmeijdam/32/218564_2.png) [@hmeijdam](https://forum.arduino.cc/u/hmeijdam)\
**Post date:** [July 26, 2024, 5:48pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/14 "2024-07-26T17:48:16Z")

</div>

And you did not select UART1 by accident, before doing "burn bootloader"?

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/5/4/2/542131189cb43c0350fa49c3528db14fc3d527d1.png)

I am using the 328PB on my DIY boards and the urboot bootloader works well and on both UART's the BP has.

---

<div class="post-metadata">

**Author:** ![trilerian](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/trilerian/32/979346_2.png) [@trilerian](https://forum.arduino.cc/u/trilerian)\
**Post date:** [July 26, 2024, 6:21pm UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/15 "2024-07-26T18:21:20Z")

</div>

Some things that have helped me with serial programming a stand alone 328PB. Make sure the variant "328PB" is selected (though that normally gives a device sig error if it isn't selected), make sure you are using the MiniCore 328 board. Close out of all serial monitor sessions in the IDE and from terminal emulators if you are using one (this is a big one, open serial monitor sessions will give the error you see).

Check for solder bridges anywhere on the 328 chip. I have run into issues a few times from this. I solder my chips using solder paste and a heat bed along with hot air, it took me awhile to get a good process down to where I wasn't created bridges all the time. Now it only happens occasionally, but it will stop the serial programming in its tracks.

I use the DSD Tech FTDI 232 USB Serial TTL, Tx -\> Tx, Rx -\> Rx, RST -\> reset through a 100nF cap (which looks like you have). I have also used Uno R3s as a USB Serial adapter. Take out the 328P chip and connect with Tx, Rx, RST, Gnd, and 5V.

---

<div class="post-metadata">

**Author:** ![helihasko](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/helihasko/32/973435_2.png) [@helihasko](https://forum.arduino.cc/u/helihasko)\
**Post date:** [July 29, 2024, 6:35am UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/16 "2024-07-29T06:35:03Z")

</div>

I also suspect a reset circuit problem and not a software one, so I scoped the reset pin while pressing upload and this is what I´ve got:

 ![no diode](https://europe1.discourse-cdn.com/arduino/original/4X/d/7/1/d7193bea0f238bd0a50cbb94c6f910ebd673ba52.jpeg)

The datasheet of the 328pb mentiones a lower reset threshold voltage of 0.2\*Vcc (so 1V for 5V Vcc). However it seems like the reset pin only goes down to 1.78V. Could this be my problem? Do I need a larger pullup resistor and/or smaller cap?

---

<div class="post-metadata">

**Author:** ![helihasko](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/helihasko/32/973435_2.png) [@helihasko](https://forum.arduino.cc/u/helihasko)\
**Post date:** [July 29, 2024, 8:51am UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/17 "2024-07-29T08:51:08Z")

</div>

So the solution to my problem is to either use a 3.3V serial programmer, or with a 5V programmer use a protection diode on the reset pin to prevent the 328pb from enetring HV programming mode (which it apperantly did).

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [January 25, 2025, 8:51am UTC](https://forum.arduino.cc/t/minicore-uploading-problems/1285104/18 "2025-01-25T08:51:23Z")

</div>

Closed on January 25, 2025, 8:51am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
