Go Down

Topic: Cant bootload ATMEGA328PU-TH (Read 123 times) previous topic - next topic

RyanAES

So i am at my wits end with this as i have never had problems with boot loading before.. I made some pcbs with the chip on the subject title above and cant for the life of me upload a bootloader via arduino as isp.

I am using an arduino nano in order to do this but i get an error even when using minicore, I posted similar subject on the wrong thread so hopefully i wont get in to bother for this, Anyway this is the chip that is currently on my board:

https://lcsc.com/product-detail/ATMEL-AVR_ATMEL_ATMEGA328P-AU_ATMEGA328P-AU_C14877.html.

I have never used these chips before as i am used to the chips on the uno ATMEGA328P U.
Whatever the difference between these two microcontrollers i just cant seem to boot load the AU version successfully! 

I decided to test each pcb against each other and found two of the pcbs had 5 volts coming from the MOSI pin of the microcontroller so decided to sit those to the side although i still cannot upload the bootloader successfully, I decided to order another version the atmega chip ATMEGA328-AU which is without the P, Could it be the chips themselves due to having different signatures? I will post a picture of my schematic below which also could be the error.

ERROR:

Code: [Select]
Arduino: 1.8.13 (Windows 10), Board: "Arduino Nano, ATmega328P"

C:\Users\RyanA\Downloads\arduino-1.8.13-windows\arduino-1.8.13\hardware\tools\avr/bin/avrdude -CC:\Users\RyanA\Downloads\arduino-1.8.13-windows\arduino-1.8.13\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM5 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m



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\RyanA\Downloads\arduino-1.8.13-windows\arduino-1.8.13\hardware\tools\avr/etc/avrdude.conf"



         Using Port                    : COM5

         Using Programmer              : stk500v1

         Overriding Baud Rate          : 19200

         AVR Part                      : ATmega328P

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PC2

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :



                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff

           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00



         Programmer Type : STK500

         Description     : Atmel STK500 Version 1.x firmware

         Hardware Version: 2

         Firmware Version: 1.18

         Topcard         : Unknown

         Vtarget         : 0.0 V

         Varef           : 0.0 V

         Oscillator      : Off

         SCK period      : 0.1 us



avrdude: AVR device initialized and ready to accept instructions



Error while burning bootloader.

Reading | ################################################## | 100% 0.02s



avrdude: Device signature = 0xffff00

avrdude: Expected signature for ATmega328P is 1E 95 0F

         Double check chip, or use -F to override this check.



avrdude done.  Thank you.








PaulRB

You have a second SPI device on the bus (mcp2515) and it's chip select is controlled by an atmega pin, which will be floating, there is no pull-up/down resistor there that I can see. So could the mcp chip be  interfering with the bus?

markd833

Have you taken onboard the suggestions from your other thread?

I would suggest you implement what was advised in #1 and #2 as a starter.

I'm guessing (judging by the value that you've assigned to it) that the component L1 between the RESET and VCC was meant to be a resistor, rather than an inductor?

In the designs I've seen, AREF generally has a 100n capacitor to GND.

ShermanP

You will not want to use the 328.  The 328P (the one in your link) is the right one, and it's the one found on the Uno, Nano and Pro Mini.  From other threads, it's not clear the Arduino IDE will even work as is with the 328.

Have you made sure your Uno as ISP will successfully flash a bootloader to something else?

PaulRB

From other threads, it's not clear the Arduino IDE will even work as is with the 328.
Yes, it works fine. You can select 328 or 328P with minicore.

But changing to use 328 instead of 328P will not help the OP. The problem for the OP is jumping into the deep end of the pool before learning to swim.

Go Up