Problem burning bootloader to ATMega 328PB - Page 1
Forum section: electronics / general

author: trilerian
author_rank: Regular Contributor
timestamp: February 26, 2024, 02:39:19 pm
content: As the title says, I am having issues burning the bootloader to a 328PB chip. Breadboard setup using a clamshell. I am using Minicore that has support for the 328PB and this setup has worked in the past, I have burned the bootloader to close to 100 328PB chips using this setup. I checked and it still works with the 328P chip.Here is the output from the IDECode:"C:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\7.2-arduino.1/bin/avrdude" "-CC:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1/avrdude.conf" -v -patmega328pb -cstk500v1 -PCOM7 -b19200 -e -Ulock:w:0xff:m -Uefuse:w:0b11110101:m -Uhfuse:w:0xd7:m -Ulfuse:w:0b11111111:mavrdude: Version 7.2-arduino.1Copyright the AVRDUDE authors;see https://github.com/avrdudes/avrdude/blob/main/AUTHORSSystem wide configuration file is C:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1\avrdude.confUsing Port : COM7Using Programmer : stk500v1Overriding Baud Rate : 19200AVR Part : ATmega328PBChip Erase delay : 10500 usPAGEL : PD7BS2 : PC2RESET disposition : possible i/oRETRY pulse : SCKSerial program mode : yesParallel program mode : yesTimeout : 200StabDelay : 100CmdexeDelay : 25SyncLoops : 32PollIndex : 3PollValue : 0x53Memory Detail :Block Poll Page PolledMemory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------eeprom 65 20 4 0 no 1024 4 0 3600 3600 0x00 0x00flash 65 10 128 0 yes 32768 128 256 4500 4500 0x00 0x00lfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00hfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00efuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00lock 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00Programmer Type : STK500Description : Atmel STK500 version 1.x firmwareHardware Version: 2Firmware Version: 1.18Topcard : UnknownVtarget : 0.0 VVaref : 0.0 VOscillator : OffSCK period : 0.1 usavrdude: AVR device initialized and ready to accept instructionsavrdude: device signature = 0x1e9516 (probably m328pb)avrdude: erasing chipavrdude: processing -U lock:w:0xff:mavrdude: reading input file 0xff for lockwith 1 byte in 1 section within [0, 0]avrdude: writing 1 byte lock ...avrdude: 1 byte of lock writtenavrdude: verifying lock memory against 0xffavrdude: 1 byte of lock verifiedavrdude: processing -U efuse:w:0b11110101:mavrdude: reading input file 0b11110101 for efusewith 1 byte in 1 section within [0, 0]avrdude: writing 1 byte efuse ...avrdude: 1 byte of efuse writtenavrdude: verifying efuse memory against 0b11110101avrdude: 1 byte of efuse verifiedavrdude: processing -U hfuse:w:0xd7:mavrdude: reading input file 0xd7 for hfusewith 1 byte in 1 section within [0, 0]avrdude: writing 1 byte hfuse ..."C:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\7.2-arduino.1/bin/avrdude" "-CC:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1/avrdude.conf" -v -patmega328pb -cstk500v1 -PCOM7 -b19200 "-Uflash:w:C:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart1_rxb4_txb3/led+b5/urboot_atmega328pb_pr_ee_ce.hex:i" -Ulock:w:0xff:mavrdude: 1 byte of hfuse writtenavrdude: verifying hfuse memory against 0xd7avrdude: 1 byte of hfuse verifiedavrdude: processing -U lfuse:w:0b11111111:mavrdude: reading input file 0b11111111 for lfusewith 1 byte in 1 section within [0, 0]avrdude: writing 1 byte lfuse ...avrdude: 1 byte of lfuse writtenavrdude: verifying lfuse memory against 0b11111111avrdude: 1 byte of lfuse verifiedavrdude done. Thank you.avrdude: Version 7.2-arduino.1Copyright the AVRDUDE authors;see https://github.com/avrdudes/avrdude/blob/main/AUTHORSSystem wide configuration file is C:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1\avrdude.confUsing Port : COM7Using Programmer : stk500v1Overriding Baud Rate : 19200AVR Part : ATmega328PBChip Erase delay : 10500 usPAGEL : PD7BS2 : PC2RESET disposition : possible i/oRETRY pulse : SCKSerial program mode : yesParallel program mode : yesTimeout : 200StabDelay : 100CmdexeDelay : 25SyncLoops : 32PollIndex : 3PollValue : 0x53Memory Detail :Block Poll Page PolledMemory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------eeprom 65 20 4 0 no 1024 4 0 3600 3600 0x00 0x00flash 65 10 128 0 yes 32768 128 256 4500 4500 0x00 0x00lfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00hfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00efuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00lock 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00Programmer Type : STK500Description : Atmel STK500 version 1.x firmwareHardware Version: 2Firmware Version: 1.18Topcard : UnknownVtarget : 0.0 VVaref : 0.0 VOscillator : OffSCK period : 0.1 usavrdude: AVR device initialized and ready to accept instructionsavrdude: device signature = 0x1e9516 (probably m328pb)avrdude: Note: flash memory has been specified, an erase cycle will be performed.To disable this feature, specify the -D option.avrdude: erasing chipavrdude: processing -U flash:w:C:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart1_rxb4_txb3/led+b5/urboot_atmega328pb_pr_ee_ce.hex:iavrdude: reading input file C:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart1_rxb4_txb3/led+b5/urboot_atmega328pb_pr_ee_ce.hex for flashwith 368 bytes in 2 sections within [0x7e80, 0x7fff]using 3 pages and 16 pad bytesavrdude: writing 368 bytes flash ...Writing | ################################################## | 100% 0.08savrdude: 368 bytes of flash writtenavrdude: verifying flash memory against C:\Users\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart1_rxb4_txb3/led+b5/urboot_atmega328pb_pr_ee_ce.hexReading | ################################################## | 100% 0.00savrdude avr_verify() warning: verification mismatchdevice 0x40 != input 0x11 at addr 0x7e80 (error)device 0x40 != input 0x24 at addr 0x7e81 (error)device 0x41 != input 0x24 at addr 0x7e82 (error)device 0x41 != input 0xb6 at addr 0x7e83 (error)device 0x42 != input 0x14 at addr 0x7e84 (error)device 0x42 != input 0xbe at addr 0x7e85 (error)device 0x43 != input 0x80 at addr 0x7e86 (error)device 0x43 != input 0xe0 at addr 0x7e87 (error)device 0x44 != input 0x7e at addr 0x7e88 (error)device 0x44 != input 0xd0 at addr 0x7e89 (error)suppressing further verification errorsavrdude do_op() error: verification mismatchavrdude done. Thank you.Failed to burn bootloader: uploading error: exit status 1Any help would be appreciated, I've already spent about 6 hours on this going through connections and banging my head against the wall. I have tried powering from 5V supply as well as the Arduino programmer. I am using Arduino as a programmer, I have tried clone Nano's, real Nano, and a real Uno R3. Same error.

author: trilerian
author_rank: Regular Contributor
timestamp: February 26, 2024, 04:12:52 pm
content: As an update. I can solder the 328PB to a pcb that has the MOSI, MISO, SCK and other required pins broke out on and can burn the bootloader without issue. I had to modify a pcb to do this, and soldering every mcu onto the pcb to burn the bootloader only to remove it seems like a lot of time to spend on this. I am going to build a proto board with some headers to hold the clamshell and solder the rest of the leads on. I am thinking this is an issue with the bread board, but can't figure out why the 328P works...

author: trilerian
author_rank: Regular Contributor
timestamp: February 26, 2024, 05:07:55 pm
content: I made a proto board and it works. Bread board just isn't it. It was a brand new bread board too, connections seemed tight.