# Arduino nano ATmega328PB upload issue

**URL:** <https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783>\
**Category:** Uploading\
**Created:** [April 29, 2025, 7:17pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783 "2025-04-29T19:17:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [April 29, 2025, 7:17pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/1 "2025-04-29T19:17:08Z")

</div>

I bought 3 Arduino nano clones from Aliexpress and have been having problem with uploading. Strangely I was initially able to upload a blink sketch but not anymore. After searching online and on the forum I found that the issue is the chip 328PB used on these clones, which is different from the 328P. And possibly the bootloader (old vs new?).  
I found several videos and post but none of them works.  
This is what I have done so far:  
1-added a minicore board which I understand supports the PB version  
2-used an arduino uno as an ISP to flash the new bootloader on the nano.

still not able to upload

I am not sure if I completed step 2 properly, this is what I get from the verbose:

```arduino
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is C:\Users\inhk\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\etc\avrdude.conf

Using port : COM4
Using programmer : stk500v1
Setting baud rate : 19200
AVR part : ATmega328PB
Programming modes : SPM, ISP, HVPP, debugWIRE
Programmer type : STK500
Description : Atmel STK500 v1
HW Version : 2
FW Version : 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.0 us
XTAL frequency : 7.372800 MHz

AVR device initialized and ready to accept instructions
Device signature = 1E 95 16 (ATmega328PB)
Erased chip

Processing -U lock:w:0xff:m
Reading 1 byte for lock from input file 0xff
in 1 section [0, 0]
Writing 1 byte (0xFF) to lock, 1 byte written, 1 verified

Processing -U efuse:w:0b11110101:m
Reading 1 byte for efuse from input file 0b11110101
in 1 section [0, 0]
Writing 1 byte (0xF5) to efuse, 1 byte written, 1 verified

Processing -U hfuse:w:0xd7:m
Reading 1 byte for hfuse from input file 0xd7
in 1 section [0, 0]
Writing 1 byte (0xD7) to hfuse, 1 byte written"C:\Users\inhk\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/bin/avrdude" "-CC:\Users\inhk\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/etc/avrdude.conf" -v -patmega328pb -cstk500v1 -PCOM4 -b19200 "-Uflash:w:C:\Users\inhk\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.4/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b5/urboot_atmega328pb_pr_ee_ce.hex:i" -Ulock:w:0xff:m
, 1 verified

Processing -U lfuse:w:0b11111111:m
Reading 1 byte for lfuse from input file 0b11111111
in 1 section [0, 0]
Writing 1 byte (0xFF) to lfuse, 1 byte written, 1 verified

Avrdude done. Thank you.
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is C:\Users\inhk\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\etc\avrdude.conf

Using port : COM4
Using programmer : stk500v1
Setting baud rate : 19200
AVR part : ATmega328PB
Programming modes : SPM, ISP, HVPP, debugWIRE
Programmer type : STK500
Description : Atmel STK500 v1
HW Version : 2
FW Version : 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.0 us
XTAL frequency : 7.372800 MHz

AVR device initialized and ready to accept instructions
Device signature = 1E 95 16 (ATmega328PB)
Auto-erasing chip as flash memory needs programming (-U flash:w:...)
specify the -D option to disable this feature
Erased chip

Processing -U flash:w:C:\Users\inhk\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.4/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b5/urboot_atmega328pb_pr_ee_ce.hex:i
Reading 384 bytes for flash from input file urboot_atmega328pb_pr_ee_ce.hex
in 1 section [0x7e80, 0x7fff]: 3 pages and 0 pad bytes
Writing 384 bytes to flash
Writing | ################################################## | 100% 0.41s
Reading | ################################################## | 100% 0.23s
384 bytes of flash verified

Processing -U lock:w:0xff:m
Reading 1 byte for lock from input file 0xff
in 1 section [0, 0]
Writing 1 byte (0xFF) to lock, 1 byte written, 1 verified

Avrdude done. Thank you.

```

I am not very familiar with burning bootloaders and also I am not clear what setting should I used - once I have successfully done that - to upload a skecth on the nano.

from the verbose it looks like the bootloader process run smoothly but if I connect the nano I still cannot upload and also when I press reset on the nano there are no signs of blinking on the on board leds, the only sign is that the tx led is no longer constantly on (as it was before flashing the bootloader), only the Pwr led is on. apart from this no much luck in getting any code on the board.

---

<div class="post-metadata">

**Author:** ![camsysca](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/camsysca/32/1015228_2.png) [@camsysca](https://forum.arduino.cc/u/camsysca)\
**Post date:** [April 29, 2025, 7:37pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/2 "2025-04-29T19:37:42Z")

</div>

What I posted earlier might help.

> [@How to configure Arduino R3 ATMEGA328PB](https://forum.arduino.cc/t/how-to-configure-arduino-r3-atmega328pb/1331071):
>
> Hi, guys. I bought this dude here: [https://s.click.aliexpress.com/e/\_DD0TYk9](https://s.click.aliexpress.com/e/_DD0TYk9) but I have so many troubles trying to connect and upload code (even burn the bootloader) So, have anyone here purchased the same board to share how to configure and upload code to it?

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [April 29, 2025, 9:46pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/3 "2025-04-29T21:46:48Z")

</div>

@camsysca  
Thanks a lot. I had missed your post when searching!

this was the key issue:

> Note - I already have the CH340 USB driver loaded, as I use it all the time for my Nano clones.

I installed the driver (instruction and download link here: [[How to Install CH340 Drivers - SparkFun Learn](https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all)]

then I was able to upload using the MiniCore board with settings shown in the picture

 ![Screenshot](https://europe1.discourse-cdn.com/arduino/original/4X/5/c/1/5c1bf019d2da8343e60ef07c9ad371d9c1cd8b5c.png)

it's working now (finger crossed....)

but note that it only worked on the nano in which I had previously flashed a bootloader using an arduino uno. So this appears to be necessary, when I try to upload directly on a new board, it would not work.

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [April 30, 2025, 8:21pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/4 "2025-04-30T20:21:42Z")

</div>

finger crossing didn't help... strangely enough after successfully uploading a sketch on a nano I repeated the process for my other two boards and it didn't work. So either I have done something different the first time without realizing or this things are just temperamental....  
the driver is now installed, I have flashed the bootloader via arduino on them but it won't upload even using the same exact settings. funny enough it wont even upload on the nano on which I previously uploaded a sketch successfully...

now I just get this:

```arduino
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is C:\Users\inhk\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\etc\avrdude.conf

Using port : COM9
Using programmer : urclock
Setting baud rate : 115200
Error: cannot open port \\.\COM9: Access is denied.

Error: unable to open port COM9 for programmer urclock

Avrdude done. Thank you.
Failed uploading: uploading error: exit status 1

```

it appears that the board is connected and the debug message (from the sketch I uploaded on it previously) is printing regularly on the serial monitor, but the IDE cannot upload a new sketch on it (and the debug message keeps on printing)

---

<div class="post-metadata">

**Author:** ![BitSeeker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bitseeker/32/1241632_2.png) [@BitSeeker](https://forum.arduino.cc/u/BitSeeker)\
**Post date:** [April 30, 2025, 8:40pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/5 "2025-04-30T20:40:48Z")

</div>

Which bootloader did you flash? The AVR Optiboot one or the Minicore urclock one?

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [April 30, 2025, 8:48pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/6 "2025-04-30T20:48:54Z")

</div>

Was it you who left a message just a minute ago? the message has been removed...  
I follow that advise (closing serial monitor, removing the board, restarting IDE, then replugging the board) and it worked, but 1) did not understand what I did wrong in the first place and 2) I had to repeat the process to do it again and does not always work...

@ BitSeeker when I flashed the bootloader I selected MiniCore Board. so presumably the minicore one

UPDATE:  
it looks like I can upload a sketch if disconnect and reconnect the board and if I am fast enough to press upload before the sketch on the board is running. Once the sketch is running it won't work anymore

---

<div class="post-metadata">

**Author:** ![BitSeeker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bitseeker/32/1241632_2.png) [@BitSeeker](https://forum.arduino.cc/u/BitSeeker)\
**Post date:** [April 30, 2025, 9:44pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/7 "2025-04-30T21:44:21Z")

</div>

> [@fluxia](#):
>
> Was it you who left a message just a minute ago? the message has been removed...  
> I follow that advise (closing serial monitor, removing the board, restarting IDE, then replugging the board) and it worked,

Guilty as charged. I did start with that, but then figured I'd check what boot-loader it is first. If you had the AVR library selected and burned the Optiboot boot-loader, then tried to upload using the Minicore library which expects the urclock boot-loader, then that would not have worked, so I wanted to check that first. If you uploaded the Minicore one, then that's not the issue. Your board selection and options look good for a 328PB as well. I take it it definitely has a 16MHz crystal?

Its not unknown sometimes that if the port being accessed by another process when an upload request is made, that the board gets reset, but Windows sees the port as being busy and assigns another COM port to it, but the IDE displays the original port which is no longer accessible because the board has moved to another port in the background.

There is also a known bug in relation to the Serial Monitor, especially if its open in another window, although I have not experienced this myself:

> [@Cannot upload when Serial Monitor is open](https://forum.arduino.cc/t/cannot-upload-when-serial-monitor-is-open/978096/2):
>
> Hi @JohnRob. There are a couple of known bugs that would cause this to happen if you had Serial Monitor open in a previous IDE window: The only upload problem I'm aware of that would occur if you only ever had Serial Monitor open in a single IDE window during the session is timing specific: If you are able to determine that the problem you had is not one of these known bugs, please let us know here on the forum or via an issue report on GitHub if you prefer.

I am not sure whether this might have been fixed in more recent versions of the IDE or whether it still surfaces occasionally.

Usually, if one shuts down serial monitor, the IDE and unplugs the board, that should clear any processes that might be hogging the serial port and one can start over.

That does not explain the behavior described in your last comment though. Can I ask what sketch you uploaded? It wasn't a keyboard/HID by any chance was it?

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [April 30, 2025, 9:52pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/8 "2025-04-30T21:52:41Z")

</div>

It's just a simple sketch that prints out the word "working" on the serial monitor every second. 🙂  
in the meantime I found this [[MiniCore uploading problems](https://forum.arduino.cc/t/minicore-uploading-problems/1285104)] and a further chatgpt enquiry gave me this response:

```arduino
That behavior confirms that the bootloader is only active briefly after power-up, and your sketch is likely interfering with future uploads once it's running.

What's happening:
On reset (or reconnect), the bootloader runs first, waiting for a short time (e.g. 500 ms–2 s) for a new upload.

If no upload begins, it runs the sketch.

Once the sketch is running, serial upload can fail if:

The sketch uses the serial port (blocking upload),

The auto-reset mechanism (via DTR) isn’t reliably triggering a reset, or

The reset pin isn’t cleanly returning to bootloader mode (e.g. if the board entered the spurious HVPP state, as discussed earlier).

Why the reconnect-then-upload trick works:
When you reconnect the board, it resets and powers up cleanly. If you press “Upload” during the short bootloader window, it catches the request and works. But once your sketch is running (and especially if it uses Serial), that window is gone.

How to fix this long-term (without changing your programmer):
Add a diode from RESET to VCC (1N4148, anode to RESET, cathode to VCC) to prevent the false HVPP trigger. This stabilizes reset behavior and allows reliable uploads even after the sketch starts.

Ensure your sketch doesn't immediately block Serial. ie while (!Serial);

Check your auto-reset circuit.

If your board lacks the usual DTR → 0.1 µF → RESET cap setup, AVRDude may not be able to reset it.

Or, if you have it but no clamp diode, the cap might trigger spurious behavior (as discussed).

Optional: Use “Upload Using Programmer” to bypass the bootloader entirely (if you’re using ICSP), but this is slower and overwrites the bootloader unless you flash it back later.

```

so the question is if it is a hardware problem... which nanos with a 328PB chip have?

---

<div class="post-metadata">

**Author:** ![BitSeeker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bitseeker/32/1241632_2.png) [@BitSeeker](https://forum.arduino.cc/u/BitSeeker)\
**Post date:** [May 1, 2025, 7:35am UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/9 "2025-05-01T07:35:29Z")

</div>

That is an interesting bit of information. I was not aware of the diode mod. There seems to be a variety of these Nano clones around. A lot of them now seem to have the USB-C connector although its still possible to get ones with a Micro-USB port. I ordered a Nano recently and it has the 328PB onboard and the USB-C connector. Allegedly it also has the FTDI UART chip, although the markings were removed and the chip has the same package as the CH340..... I have not experienced any problem using the urclock boot-loader with this one, but have actually just ordered a couple more with the CH340 onboard to compare.

Its not a problem with the 328PB chip as such, but does sound like a problem with the way the UART is implemented on the board.

As per the last line, its useful to have a USBASP programmer to hand. They are quite cheap and will allow you to work around the serial problem and reset a blocked board. Or else you can use a spare Arduino board as an ICSP programmer.

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [May 1, 2025, 5:25pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/10 "2025-05-01T17:25:37Z")

</div>

> [@BitSeeker](#):
>
> its useful to have a USBASP programmer to hand. They are quite cheap and will allow you to work around the serial problem and reset a blocked board.

Thanks for this advice. I think I will buy one of these... read that it will erase the bootloader, which is not a big deal if you use the USBASP to program the board all the time. I suppose it also uses the space reserved for the bootloader ? (Hence gaining space?)  
Until I get that I will probably just stick to reset the board by disconnecting and reconnecting before uploading.

If you get the new nano and find to have the same issue please let me know how you got to resolve it

> A lot of them now seem to have the USB-C connector

yes, that's the one I have got

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [May 1, 2025, 11:52pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/11 "2025-05-01T23:52:53Z")

</div>

> [@BitSeeker](#):
>
> There is also a known bug in relation to the Serial Monitor, especially if its open in another window, although I have not experienced this myself:
> 
> > [@](#):
> >
> > Hi @JohnRob. There are a couple of known bugs that would cause this to happen if you had Serial Monitor open in a previous IDE window: The only upload problem I'm aware of that would occur if you only ever had Serial Monitor open in a single IDE window during the session is timing specific: If you are able to determine that the problem you had is not one of these known bugs, please let us know here on the forum or via an issue report on GitHub if you prefer.
> 
> I am not sure whether this might have been fixed in more recent versions of the IDE or whether it still surfaces occasionally.

Those are fixed. There is another one that is still outstanding:

> <https://github.com/arduino/arduino-ide/issues/1783>
>
> \### Describe the problem
> 
> In order to upload to an Arduino board via a serial po…rt, the upload tool (e.g., \[\*\*AVRDUDE\*\*\](https://github.com/avrdudes/avrdude)) must be able to open the port. This is not possible if another process already has control of the port.
> 
> Arduino IDE's "Serial Monitor" and and "Serial Plotter" components also use the serial port of the board. Arduino IDE handles this potential conflict of port usage automagically by closing the port in Serial Monitor/Plotter when an upload process is triggered, then opening it again after the upload is finished. This means no special action is needed from the user to upload while Serial Monitor/Plotter is open.
> 
> 🐛 The upload fails with an "\`Access is denied\`" error under the following conditions:
> 
> \- The board uses an FTDI FT232R USB chip
> \- Arduino IDE is running on a Windows machine
> \- Serial Monitor or Serial Plotter is open
> 
> I've been using Arduino IDE 2.0.3 with Nano without issues when uploading on Ubuntu. Now I've tried it on Windows 11, and most of the time, it gives me this error:
> 
> \`\`\`text
> 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 "C:\\Users\\macie\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avrdude\\6.3.0-arduino17/etc/avrdude.conf"
> 
> Using Port : COM5
> Using Programmer : arduino
> Overriding Baud Rate : 115200
> avrdude: ser\_open(): can't open device "\\\\.\\COM5": Access is denied.
> \`\`\`
> 
> But I can see logs from the serial monitor in Arduino IDE -\> serial monitor. 
> 
> \### To reproduce
> 
> \#### Equipment
> 
> A board or other device that has an \[FTDI FT232R\](https://ftdichip.com/products/ft232rl/) USB chip.
> 
> The \[classic \*\*Arduino Nano\*\*\](https://docs.arduino.cc/hardware/nano) is a common board that uses this chip.
> 
> FT232R modules (\[example\](https://docs.arduino.cc/retired/other/usb-serial-converter)) or cables (\[example\](https://www.sparkfun.com/products/9717)) are also often used to upload to boards such as the \[\*\*Arduino Pro Mini\*\*\](https://www.sparkfun.com/products/11113) that don't have an integrated USB chip.
> 
> The fault can be reproduced even if the FTDI-based device is not an Arduino board. In this case, the upload is expected to fail, but it would fail with a "\`not in sync\`" error instead of "\`Access is denied\`".
> 
> \#### Steps
> 
> 1. Select \*\*File \> New Sketch\*\* from the Arduino IDE menus.
> 1. Connect the Arduino board to your computer.
> 1. Select the board and port from the Arduino IDE menus.
> 1. If the Serial Monitor view is not already open, select \*\*Tools \> Serial Monitor\*\* from the Arduino IDE menus to open it.
> 1. Select \*\*Sketch \> Upload\*\* from the Arduino IDE menus.
> 1. Wait for the upload process to finish.
> 🐛 The upload fails:
> \`\`\`text
> 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 "C:\\Users\\macie\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avrdude\\6.3.0-arduino17/etc/avrdude.conf"
>    
> Using Port : COM5
> Using Programmer : arduino
> Overriding Baud Rate : 115200
> avrdude: ser\_open(): can't open device "\\\\.\\COM5": Access is denied.
> \`\`\`
> 1. Click the \*\*X\*\* icon on the "\*\*Serial Monitor\*\*" view tab in the bottom panel.
> 1. Select \*\*Sketch \> Upload\*\* from the Arduino IDE menus.
> 1. Wait for the upload process to finish.
> 🙂 The upload is successful.
> 1. Select \*\*Tools \> Serial Plotter\*\* from the Arduino IDE menus.
> 1. Select \*\*Sketch \> Upload\*\* from the Arduino IDE menus.
> 1. Wait for the upload process to finish.
> 🐛 The upload fails:
> \`\`\`text
> 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 "C:\\Users\\macie\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avrdude\\6.3.0-arduino17/etc/avrdude.conf"
>    
> Using Port : COM5
> Using Programmer : arduino
> Overriding Baud Rate : 115200
> avrdude: ser\_open(): can't open device "\\\\.\\COM5": Access is denied.
> \`\`\`
> 1. Close the "\*\*Serial Plotter\*\*" window.
> 1. Select \*\*Sketch \> Upload\*\* from the Arduino IDE menus.
> 1. Wait for the upload process to finish.
> 🐛 The upload fails:
> \`\`\`text
> 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 "C:\\Users\\macie\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avrdude\\6.3.0-arduino17/etc/avrdude.conf"
>    
> Using Port : COM5
> Using Programmer : arduino
> Overriding Baud Rate : 115200
> avrdude: ser\_open(): can't open device "\\\\.\\COM5": Access is denied.
> \`\`\`
> \*\*ⓘ\*\* This unexpected result is caused by a separate bug: https://github.com/arduino/arduino-ide/issues/1423
> 
> \### Expected behavior
> 
> Serial Monitor and Serial Plotter do not interfere with upload process.
> 
> \### Arduino IDE version
> 
> \#### Original report
> 
> 2.0.3
> 
> \#### Last verified with
> 
> 2.3.3
> 
> \### Operating system
> 
> Windows
> 
> \### Operating system version
> 
> Edition	Windows 11 Pro
> Version	22H2
> Installed on	07/11/2022
> OS build	22621.963
> Experience	Windows Feature Experience Pack 1000.22638.1000.0
> 
> \### Additional context
> 
> I bisected the introduction of the fault to df8658e
> 
> \---
> 
> Logs generated from an upload that fails with this fault using the build for 053574b with the \`arduino.cli.daemon.debug\` \[advanced setting\](https://github.com/arduino/arduino-ide/blob/main/docs/advanced-usage.md#advanced-settings) set to \`true\`:
> 
> \[2023-08-16\_log.log\](https://github.com/arduino/arduino-ide/files/12357046/2023-08-16\_log.log)
> 
> \---
> 
> I have no problems uploading sketches on Arduino IDE 1.8.19 from Microsoft Store on the same system. I can quit 2.0.3, start 1.8.19, and it's working immediately.
> 
> \---
> 
> I cannot reproduce the fault on Linux (Ubuntu 22.04) or macOS (Ventura).
> 
> \---
> 
> I cannot reproduce the fault when using native USB boards (e.g., \[\*\*Leonardo\*\*\](https://docs.arduino.cc/hardware/leonardo), \[\*\*MKR\*\*\](https://docs.arduino.cc/#mkr-family)) or boards that use other models of dedicated USB chip (e.g., ATmega16U2 on Uno and Mega, WCH CH340 on derivative boards).
> 
> \<a name="workaround"\>\</a\>
> 
> \#### Workaround
> 
> \<a name="serial-monitor"\>\</a\>
> 
> \##### Serial Monitor
> 
> 1. Click the \*\*X\*\* icon on the "\*\*Serial Monitor\*\*" tab in the bottom panel of the Arduino IDE window to close the tab:
> !\[image\](https://user-images.githubusercontent.com/8572152/215050213-e6c41c1a-0eae-448a-ae91-f2acefedf793.png)
> 1. Upload the sketch.
> 1. Open \*\*Serial Monitor\*\* again if needed (by clicking the icon on the IDE toolbar or the \*\*Tools \> Serial Monitor\*\* menu item) after the upload is finished.
> 
> \<a name="serial-plotter"\>\</a\>
> 
> \##### Serial Plotter
> 
> 1. Close the "\*\*Serial Plotter\*\*" window.
> 1. If the "\*\*Serial Monitor\*\*" view is not already open, select \*\*Tools \> Serial Monitor\*\* from the Arduino IDE menus to open it.
> \*\*ⓘ\*\* We must do an open/close cycle on \*\*Serial Monitor\*\* as a workaround for \[a bug\](https://github.com/arduino/arduino-ide/issues/1423) in \*\*Serial Plotter\*\*
> 1. Click the \*\*X\*\* icon on the "\*\*Serial Monitor\*\*" tab in the bottom panel of the Arduino IDE window to close the tab:
> !\[image\](https://user-images.githubusercontent.com/8572152/215050213-e6c41c1a-0eae-448a-ae91-f2acefedf793.png)
> 1. Upload the sketch.
> 1. Open \*\*Serial Monitor\*\* and/or \*\*Serial Plotter\*\* again if needed after the upload is finished.
> 
> \#### Additional reports
> 
> \- https://github.com/arduino/arduino-ide/issues/1937
> \- https://github.com/arduino/arduino-ide/issues/726#issuecomment-1464313325
> \- https://github.com/arduino/arduino-ide/issues/1783#issuecomment-1614370292
> \- https://github.com/arduino/arduino-ide/issues/1783#issuecomment-2196936864
> \- https://www.reddit.com/r/arduino/comments/1bhwt6f/access\_is\_denied\_error\_on\_nano/
> \- https://forum.arduino.cc/t/brand-new-nano-wont-connect-to-latestide-software/1129473/10
> \- https://forum.arduino.cc/t/arduino-nano-not-able-to-upload-comx-port-access-denied/1081669/15
> \- https://forum.arduino.cc/t/elusive-uno-upload-error-access-is-denied/1067785/5
> \- https://forum.arduino.cc/t/fdti-breakout-2-types-cause-usb-acess-denial/1088005
> \- https://forum.arduino.cc/t/port-access-is-denied/1089761
> \- https://forum.arduino.cc/t/cant-open-device-when-uploading-but-serial-monitor-works/1127731
> \- https://forum.arduino.cc/t/2-1-0-no-longer-disables-monitor-during-upload-update/1139065
> \- https://forum.arduino.cc/t/access-denied-when-uploading-to-arduino-nano/1139330/1
> \- https://forum.arduino.cc/t/access-denied-when-uploading-to-arduino-nano/1139330/11
> \- https://forum.arduino.cc/t/2-11-com3-access-is-denied/1143750
> \- https://forum.arduino.cc/t/cannot-upload-to-arduino-nano/1145391
> \- https://forum.arduino.cc/t/cant-upload-to-pro-mini-port-access-is-denied/1152460
> \- https://forum.arduino.cc/t/cannot-upload-to-ftdi-megas-only/1170683
> \- https://forum.arduino.cc/t/arduinon-nano-access-denied/1181808/6
> \- https://forum.arduino.cc/t/avrdude-ser-open-cant-open-device/1228096
> \- https://forum.arduino.cc/t/avrdude-ser-open-cant-open-device-com9-access-is-denied/1205151
> \- https://forum.arduino.cc/t/exit-status-1-only-sometimes/1180375
> \- https://forum.arduino.cc/t/have-to-kill-serial-monitor-exe-to-upload-to-the-board/1173764
> \- https://forum.arduino.cc/t/arduino-nano-not-recognised-correctly/1133051
> \- https://forum.arduino.cc/t/brand-new-nano-wont-connect-to-latestide-software/1129473
> \- https://forum.arduino.cc/t/arduino-nano-avrdude-ser-open-cant-open-device-com5-access-is-denied/1124189
> \- https://forum.arduino.cc/t/i-have-a-problem-while-uploading-to-arduino-pro-mini/1255072
> \- https://forum.arduino.cc/t/problem-uploading-to-nano/1267124
> \- https://forum.arduino.cc/t/nano-appears-as-com6-and-doesnt-work/1273314
> \- https://forum.arduino.cc/t/com-port-disconnects-when-open-arduino-ide/1299780
> \- https://forum.arduino.cc/t/com-port-issues/1304755
> \- https://forum.arduino.cc/t/upload-to-pro-mini-fails-avrdude-ser-open-cant-open-device-com8-access-is-denied/1315064
> \- https://forum.arduino.cc/t/avrdude-ser-open-cant-open-device-com6-access-is-denied/1319310
> \- https://forum.arduino.cc/t/programming-issue-on-ide-2-3-4/1342261
> \- https://forum.arduino.cc/t/arduino-2-plus-ftdi/1345595
> \- https://forum.arduino.cc/t/unable-to-rewrite-sketch-on-a-non-genuine-uno/1345988
> \- https://forum.arduino.cc/t/most-attempts-to-upload-fails-arduino-nano/1362201
> \- https://forum.arduino.cc/t/nano-access-denied/1368729
> \- https://forum.arduino.cc/t/access-denied-error-while-uploading/1376244
> \- https://forum.arduino.cc/t/permission-denied-on-second-upload/1383025
> \- https://forum.arduino.cc/t/cant-upload-to-my-board-while-serial-monitor-is-open/1405061
> - This seems to indicate that the bug also affects boards with the \[FTDI FT231X\](https://ftdichip.com/products/ft231xs/) chip, which is used on the current models of the \[\*\*SparkFun RedBoard\*\*\](https://www.sparkfun.com/sparkfun-redboard-programmed-with-arduino.html).
> \- https://forum.arduino.cc/t/arduino-ide-not-uploading-code-to-nano-when-serial-monitor-is-open/1405443
> \- https://forum.arduino.cc/t/same-file-positions-for-1-8-and-2-3/1405967
> \- https://forum.arduino.cc/t/arduino-ide-first-upload-after-reboot-ok-but-com-access-refused-afterwards-while-manually-uploading-using-avrdude-still-succeeds-at-the-same-time/1407273
> 
> \#### Related
> 
> \- https://forum.arduino.cc/t/issue-with-flashing-esp32-dev-kit-with-arduino-ide/1117755
> \- https://forum.arduino.cc/t/port-issues-with-ide-2-0-3/1069090
> \- https://forum.arduino.cc/t/arduino-2-plus-ftdi/1345595
> 
> \### Issue checklist
> 
> \- \[X\] I searched for previous reports in \[the issue tracker\](https://github.com/arduino/arduino-ide/issues?q=)
> \- \[X\] I verified the problem still occurs when using the latest \[nightly build\](https://www.arduino.cc/en/software#nightly-builds)
> \- \[X\] My report contains all necessary details

From my experience, it only occurs when using boards that have the FTDI FT232R USB to serial chip. I have not experienced it when using boards that have the CH340 (which it seems is the chip on @fluxia's board). However, it is definitely worth checking.

@fluxia, please try uploading normally after closing **Serial Monitor** / **Serial Plotter** :

## Serial Monitor

1. Click the **X** icon on the " **Serial Monitor**" tab in the bottom panel of the Arduino IDE window to close the tab:  
 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/c/7/4/c740abf868f5e7a91e707ad8ca5c0ba2bded909b.png)
2. Upload the sketch.
3. Open **Serial Monitor** again if needed (by clicking the icon on the IDE toolbar or the **Tools \> Serial Monitor** menu item) after the upload is finished.

## Serial Plotter

If you have the " **Serial Plotter**" window open, the procedure is a bit different from closing the **Serial Monitor** connection:

1. Close the " **Serial Plotter**" window.
2. If the " **Serial Monitor**" view is not already open, select **Tools \> Serial Monitor** from the Arduino IDE menus to open it.  
**ⓘ** We must do an open/close cycle on **Serial Monitor** as a workaround for [a bug](https://github.com/arduino/arduino-ide/issues/1423) in **Serial Plotter**
3. Click the **X** icon on the " **Serial Monitor**" tab in the bottom panel of the Arduino IDE window to close the tab:  
 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/c/7/4/c740abf868f5e7a91e707ad8ca5c0ba2bded909b.png)
4. Upload the sketch.
5. Open **Serial Monitor** and/or **Serial Plotter** again if needed after the upload is finished.

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [May 2, 2025, 2:50pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/12 "2025-05-02T14:50:29Z")

</div>

@ptillisch  
thank you but this doesn't work.  
I have plugged in the nano via a switched USB HUB to avoid taking it out and it from the usb. Switching the nano off and on just before uploading is the only thing that consistently work, so it must be a issue with the board reset(?)... All the three nano boards I bought act in the same way.

But note that pressing reset on the board itself does not help with the sketch uploading. the reset button works fine. it resets the board. maybe it's a timing issue.... at this point the short term solution is clearly to press the usb hub switch just before uploading and it will work, but it would be nice to understand what is causing this issue and how to resolve it.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [May 2, 2025, 3:54pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/13 "2025-05-02T15:54:33Z")

</div>

> [@fluxia](#):
>
> pressing reset on the board itself does not help with the sketch uploading. the reset button works fine. it resets the board.

It resets the ATmega328PB, but it doesn't affect the CH340 chip on the board (notice that the serial port of the board remains visible on your computer even if you hold down the reset button). When you power cycle the board, it causes the port to disappear and then reappear on your computer. It seems like you then have a time window to perform an upload before whatever other process grabs control of the serial port once more.

* * *

Microsoft provides a free tool named **Process Explorer** that can be used to identify the process that is using the port and causing the upload error.

1. Click the following link to open the documentation page for **Process Explorer** in your web browser:  
[https://learn.microsoft.com/sysinternals/downloads/process-explorer](https://learn.microsoft.com/sysinternals/downloads/process-explorer)
2. Click the " **Download Process Explorer**" link on that page.
3. Wait for the download to finish.
4. [Extract](https://support.microsoft.com/windows/zip-and-unzip-files-f6dde0a7-0fec-8294-e1d3-703ed85e7ebc#:~:text=To%20unzip%20files,-Open%20File%20Explorer) the downloaded file.
5. Double click on the file named `procexp.exe` in the extracted folder.  
The **Process Explorer** application will start.
6. Select **Find \> Find Handle or DLL...**" from the **Process Explorer** menus.  
" **Process Explorer Search**" dialog will open.
7. Type `\Device\Serial` in the " **Handle or DLL substring:**" field of the dialog.
8. Click the " **Search**" button.  
A search will start, as indicated by the presence of the text " **Searching...**" at the bottom of the dialog.
9. Wait for the search to finish.

You should now see a process listed in the search results. Hopefully the name of the process will give you enough of a clue to identify the application that is blocking the serial port. If so, either close the port in the application, or else close the application, then try uploading again. Hopefully the upload will be successful this time.

If you aren't able to identify the application from the process name, add a [reply](https://meta.discourse.org/t/discourse-new-user-guide/96331#replying-11) here on this forum topic to let us know, including the name of the process.

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [May 2, 2025, 7:45pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/14 "2025-05-02T19:45:52Z")

</div>

thanks for the detailed advice. Unfortunately, the search finds no application (I made the search with arduino IDE running and serial monitor active and also wafter closing the monitor):

 ![Screenshot 2025-05-02 204214](https://europe1.discourse-cdn.com/arduino/original/4X/7/d/e/7de1d9cca2dc6bee534efab526b338a6c5277582.png)

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [May 2, 2025, 8:49pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/15 "2025-05-02T20:49:05Z")

</div>

Just to be sure, does your board have a CH340 USB chip?:

 ![CH340](https://europe1.discourse-cdn.com/arduino/original/4X/d/d/5/dd50c8d297158a9b05273837eab3c0530f65f5dd.png)

 

> **📷**
>
> [SparkFun](https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all) - [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) (cropped)

 

I know you already mentioned that you installed the CH340 driver, but sometimes people install that driver even though their board doesn't have a CH340 just because there is so much advice on the Internet about solving upload problems by installing that driver.

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [May 2, 2025, 9:02pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/16 "2025-05-02T21:02:08Z")

</div>

![chip](https://europe1.discourse-cdn.com/arduino/original/4X/4/0/0/4002264e64b12d655541cd5292370c2653e364a2.jpeg)  
the chip is not marked, this is a picture

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [May 2, 2025, 9:10pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/17 "2025-05-02T21:10:48Z")

</div>

Most often when we see these strange unlabeled chips, they do identify themself as a CH340. However, there are some more rare cases where the chip identifies itself as an FTDI FT232R:

> **[Yet another chinese usb-serial IC on "arduino"? - Page 1](https://www.eevblog.com/forum/microcontrollers/yet-another-chinese-usb-serial-ic-on-arduino/)**
>
> Yet another chinese usb-serial IC on "arduino"? - Page 1

1. Connect the board to your computer with a USB cable.
2. Open the [Windows **Device Manager**](https://support.microsoft.com/en-us/windows/open-device-manager-a7f2db46-faaf-24f0-8b7b-9e4a6032fc8c).
3. Select **View \> Devices by type** from the **Device Manager** menus.
4. Open the " **View**" menu.
5. If there is a **✓** to the left of the " **Show hidden devices**" menu item, click on " **Show hidden devices**" to disable it.
6. Open the "**Ports (COM & LPT)**" section of the **Device Manager** tree.
7. Find the port of the board under the "**Ports (COM & LPT)**" section. Double click on that item.  
A dialog will open.
8. Select the " **Details**" tab in the dialog.
9. Select " **Hardware Ids**" from the " **Property**" menu.

If it is identifying itself as a CH340, then we would expect to see something like this in the "Value" field of the dialog:

```plaintext
USB\VID_1A86&PID_7523&REV_0254
USB\VID_1A86&PID_7523

```

However, if it is one of the chips that identifies as FT232R, then it would instead be something like this:

```plaintext
FTDIBUS\COMPORT&VID_0403&PID_6001

```

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [May 2, 2025, 9:18pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/18 "2025-05-02T21:18:27Z")

</div>

Bingo!!

 ![Screenshot 2025-05-02 221712](https://europe1.discourse-cdn.com/arduino/original/4X/f/9/4/f941932879c8ff5df681d4e0c46b407df230b8e8.png)  
Thank you very much!!!

I am looking into how to get it working now.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [May 2, 2025, 9:28pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/19 "2025-05-02T21:28:40Z")

</div>

OK, this is bad news because, unlike the dodgy unlabeled "CH340", we haven't managed to find techniques for making the boards with these chips work normally. In addition to the EEV Blog forum discussion I linked in my previous reply, there are a few others about these chips here on Arduino Forum:

- [Failing to upload anything](https://forum.arduino.cc/t/failing-to-upload-anything/1308444)
- [Arduino nano unable to establish connection with laptop](https://forum.arduino.cc/t/arduino-nano-unable-to-establish-connection-with-laptop/1322559)
- [Connecting to my PC - #13 by simon78duino](https://forum.arduino.cc/t/connecting-to-my-pc/1329515/13)
- [Unable to upload to UNO or Nano - #23 by paul9531031](https://forum.arduino.cc/t/unable-to-upload-to-uno-or-nano/1355715/23)
- [Problem with CH340 Driver](https://forum.arduino.cc/t/problem-with-ch340-driver/1356651)
- [Upload to ESP8266 fails: "PermissionError(13, 'A device attached to the system is not functioning.'"](https://forum.arduino.cc/t/upload-to-esp8266-fails-permissionerror-13-a-device-attached-to-the-system-is-not-functioning/1358728)

Maybe you could find something of interest there.

* * *

But circling back to the " **Process Explorer**" results, it makes sense that you didn't get any processes because the form of the FT232R's "handle" is different from that of the CH340, so the CH340-specific search query I provided in my previous instructions is inappropriate for the FT232R. You can try it again with these adjusted instructions:

1. Double click on the file named `procexp.exe` in the extracted folder.  
The **Process Explorer** application will start.
2. Select **Find \> Find Handle or DLL...**" from the **Process Explorer** menus.  
" **Process Explorer Search**" dialog will open.
3. Type `\Device\VCP` in the " **Handle or DLL substring:**" field of the dialog.
4. Click the " **Search**" button.  
A search will start, as indicated by the presence of the text " **Searching...**" at the bottom of the dialog.
5. Wait for the search to finish.

(note that this time the search query is "`\Device\VCP`" instead of "`\Device\Serial`")

---

<div class="post-metadata">

**Author:** ![fluxia](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fluxia/32/273255_2.png) [@fluxia](https://forum.arduino.cc/u/fluxia)\
**Post date:** [May 2, 2025, 9:39pm UTC](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783/20 "2025-05-02T21:39:16Z")

</div>

thanks for the links!

I was actually looking at this one, but haven't tried it yet

> **[FT232R USB UART Arduino Nano](https://www.instructables.com/FT232R-USB-UART-Arduino-Nano/)**
>
> FT232R USB UART Arduino Nano : hallo. good night everyone.
> today, i bought arduino nano v3.0 (clone), but i have problem. my computer always detect "FT232R USB UART" and arduino Ide cant detect this board. why? whats wrong? okey i have tutor for...

now I get a result when searching:

 ![Screenshot 2025-05-02 223431](https://europe1.discourse-cdn.com/arduino/original/4X/7/d/6/7d6be6a47c2d62234693c42cefb3e50c0c1261cd.png)

this also shows the drivers on my COM3 port, I am not sure if I need to uninstall them... I will check these links and see if there is a way to get it sorted but I am not very optimistic at this point. Fortunately I still have the option of uploading with manual reset ....

[Next page](https://forum.arduino.cc/t/arduino-nano-atmega328pb-upload-issue/1377783.md?page=2)
