Code is not uploading in arduino nano with atmega328pb microcontroller

I have got this arduino nano board from china.
I could not upload code after I upload once with arduino Ide and Serial port is not opening.
The com port is detected by arduino ide.

It seems that this board have ATmega328PB instead of ATmega328P.
need help.
My Arduino IDE version 2.1.0

avr-dude verbose while uploading
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\Arman\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM4
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: ser_open(): can't set com-state for "\.\COM4"

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

use the MiniCore
https://github.com/MCUdude/MiniCore#how-to-install

I had tried this.But problem is Arduino IDE is not opening the serial monitor.
Then I Tried with Serial1 with FTDI and it worked.Still it is very much inconvenient to use ftdi.
I think I am missing something

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