-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ATmega328PB-AU - signature mismatch #279
Comments
I wouldn't be surprised if this was caused by the external 16 MHz clock. The ATmega328PB is very delicate, and can't drive crystals/load capacitor combinations that aren't perfectly matched, unlike the ATmega328P, which could drive pretty much anything. How many pF are your load capacitors on the crystal? What happens if you remove the crystal and load capacitors, use this Arduino as ISP sketch instead, and connect pin 9 from the Arduino as ISP board to the XTAL1 pin on the 328PB? This will ensure you have a proper, driven clock. If programming succeeds, it means that the 328PB couldn't drive the crystal properly. I've used the very similar ATmega324PB in a commercial design where close to a thousand units were made, and crystals that stopped oscillating were a big problem. I ended up replacing the crystal with a proper external clock source that fed a square wave straight into the XTAL1 pin. It only cost a few cents more than a crystal, but was well worth it. |
You could try to replace the 22pf capacitors with some smaller ones, like 15 or even 10 pF. If you don't have that, try putting two in series. That will half their value.
This would definitely upset the 328PB. |
Ok, this getting weird. I desoldered the crystal and 22pF capacitors from the test socket pins and I tried to burn the bootloader with the internal 8 MHz selected. Nothing good in the console. /home/fenrir/.arduino15/packages/MiniCore/tools/avrdude/7.2-arduino.1/bin/avrdude -C/home/fenrir/.arduino15/packages/MiniCore/hardware/avr/3.0.0/avrdude.conf -v -patmega328pb -cstk500v1 -P/dev/ttyACM0 -b19200 -e -Ulock:w:0xff:m -Uefuse:w:0b11110111:m -Uhfuse:w:0xd7:m -Ulfuse:w:0b11111111:m avrdude: Version 7.2-arduino.1
avrdude: AVR device initialized and ready to accept instructions avrdude: processing -U lock:w:0xff:m avrdude: processing -U efuse:w:0b11110111:m avrdude: processing -U hfuse:w:0xd7:m avrdude: processing -U lfuse:w:0b11111111:m avrdude done. Thank you. /home/fenrir/.arduino15/packages/MiniCore/tools/avrdude/7.2-arduino.1/bin/avrdude -C/home/fenrir/.arduino15/packages/MiniCore/hardware/avr/3.0.0/avrdude.conf -v -patmega328pb -cstk500v1 -P/dev/ttyACM0 -b19200 -Uflash:w:/home/fenrir/.arduino15/packages/MiniCore/hardware/avr/3.0.0/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b5/urboot_atmega328pb_pr_ee_ce.hex:i -Ulock:w:0xff:m avrdude: Version 7.2-arduino.1
avrdude: AVR device initialized and ready to accept instructions avrdude: processing -U flash:w:/home/fenrir/.arduino15/packages/MiniCore/hardware/avr/3.0.0/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b5/urboot_atmega328pb_pr_ee_ce.hex:i avrdude done. Thank you. Error while burning bootloader. |
The ATmega328PB isn't useless, but its clock circuit is delicate and finicky and requires attention when designing it. If matching the crystal/capacitors or using a dedicated external clock isn't an option, use the 328P instead. |
Hello all,
I'm trying to burn the Arduino bootloader to the ATmega328PB-AU TQFP32 MCU using Arduino as ISP and I get all kinds of avrdude errors. For some reason it worked on few chips but I couldn't upload my sketch via FTDI using the Sparkfun FTDI basic UART board.
Here's what I get in the console when I try to burn the bootloader:
`
Arduino: 1.8.19 (Linux), Board: "ATmega328, Yes (UART0), EEPROM retained, 328PB, BOD 2.7V, LTO disabled, External 16 MHz"
/home/fenrir/.arduino15/packages/MiniCore/tools/avrdude/7.2-arduino.1/bin/avrdude -C/home/fenrir/.arduino15/packages/MiniCore/hardware/avr/3.0.0/avrdude.conf -v -patmega328pb -cstk500v1 -P/dev/ttyACM0 -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
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x0000ff
avrdude main() error: expected signature for ATmega328PB is 1E 95 16
double check chip or use -F to override this check
avrdude done. Thank you.
Error while burning bootloader.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
`
Any idea how can I make it work?
Thank you!
The text was updated successfully, but these errors were encountered: