Author Topic: Problem burning bootloader to ATMega 328PB  (Read 379 times)

0 Members and 1 Guest are viewing this topic.

Offline trilerianTopic starter

  • Regular Contributor
  • *
  • Posts: 163
  • Country: us
Problem burning bootloader to ATMega 328PB
« on: February 26, 2024, 02:39:19 pm »
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 IDE

Code: [Select]
"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:m

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\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1\avrdude.conf

         Using Port                    : COM7
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328PB
         Chip Erase delay              : 10500 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory 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 0x00
           flash                  65    10   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           hfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           efuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           lock                    0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           calibration             0     0     0    0 no          1    1      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
avrdude: device signature = 0x1e9516 (probably m328pb)
avrdude: erasing chip

avrdude: processing -U lock:w:0xff:m
avrdude: reading input file 0xff for lock
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lock ...
avrdude: 1 byte of lock written
avrdude: verifying lock memory against 0xff
avrdude: 1 byte of lock verified

avrdude: processing -U efuse:w:0b11110101:m
avrdude: reading input file 0b11110101 for efuse
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte efuse ...
avrdude: 1 byte of efuse written
avrdude: verifying efuse memory against 0b11110101
avrdude: 1 byte of efuse verified

avrdude: processing -U hfuse:w:0xd7:m
avrdude: reading input file 0xd7 for hfuse
         with 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:m
avrdude: 1 byte of hfuse written
avrdude: verifying hfuse memory against 0xd7
avrdude: 1 byte of hfuse verified

avrdude: processing -U lfuse:w:0b11111111:m
avrdude: reading input file 0b11111111 for lfuse
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lfuse ...
avrdude: 1 byte of lfuse written
avrdude: verifying lfuse memory against 0b11111111
avrdude: 1 byte of lfuse verified

avrdude done.  Thank you.


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\Andrew\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1\avrdude.conf

         Using Port                    : COM7
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328PB
         Chip Erase delay              : 10500 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory 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 0x00
           flash                  65    10   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           hfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           efuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           lock                    0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           calibration             0     0     0    0 no          1    1      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
avrdude: 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 chip

avrdude: 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:i
avrdude: 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 flash
         with 368 bytes in 2 sections within [0x7e80, 0x7fff]
         using 3 pages and 16 pad bytes
avrdude: writing 368 bytes flash ...
Writing | ################################################## | 100% 0.08s
avrdude: 368 bytes of flash written
avrdude: 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.hex
Reading | ################################################## | 100% 0.00s
avrdude avr_verify() warning: verification mismatch
        device 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 errors
avrdude do_op() error: verification mismatch

avrdude done.  Thank you.

Failed to burn bootloader: uploading error: exit status 1

Any 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.
 

Offline trilerianTopic starter

  • Regular Contributor
  • *
  • Posts: 163
  • Country: us
Re: Problem burning bootloader to ATMega 328PB
« Reply #1 on: February 26, 2024, 04:12:52 pm »
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...
 

Offline trilerianTopic starter

  • Regular Contributor
  • *
  • Posts: 163
  • Country: us
Re: Problem burning bootloader to ATMega 328PB
« Reply #2 on: February 26, 2024, 05:07:55 pm »
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. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf