Go Down

Topic: Bootloading Custom Mega2560 - Help Needed (Read 1 time) previous topic - next topic

luckykid

10 ohm pullup on SCL/SDA would do it for the 2560.
Was the board working with C32 = 22K resistor versus 22pf cap like that?

As for errors - the board house I use has me drop ship the parts to them, so the right stuff gets ordered.
Thanks for the help with this, I really appreciate it.  You've and the others on here likely saved us weeks of shooting in the dark!

I post when I get the 2nd set of boards and see if that works.

chucktodd

After further inspecting the board the following components were incorrect.


R3,4,5 = 10ohm vs. 10K   (Reset, SCL, SDA Pull Up)
R22 = 500K vs. 1M  (VLSI chip oscillator circuit)
C32 = 22K resistor verus 22pf cap.   (VLSI chip oscillator circuit)

Is it possible that the wrong pull ups fried the chip?

Is this common from board houses?  I am amazed at how many things are wrong.

the 10 ohm on reset would inhibit ISP programming and possibly damage the ISP programmer.

What board fab did you use?  I want to know to avoid it!

Chuck.
Currently built mega http server, Now converting it to ESP32.

CrossRoads

10 ohm on Reset - I missed that. Not too many programmers could pull that low to get the chip into programming mode;
5V/10ohm =  500mA drive current needed.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

luckykid

Just got the new board.  No hardware mods at all and here are the results:

Quote
C:\Users\Roy\AppData\Roaming\Arduino15\packages\arduino\tools\avrdude\6.0.1-arduino2/bin/avrdude -CC:\Users\Roy\AppData\Roaming\Arduino15\packages\arduino\tools\avrdude\6.0.1-arduino2/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM3 -b19200 -Uflash:w:C:\Users\Roy\AppData\Roaming\Arduino15\packages\arduino\hardware\avr\1.6.2/bootloaders/stk500v2/stk500boot_v2_mega2560.hex:i -Ulock:w:0x0F:m
Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.


avrdude: Version 6.0.1, compiled on Mar 19 2015 at 14:43:01
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Users\Roy\AppData\Roaming\Arduino15\packages\arduino\tools\avrdude\6.0.1-arduino2/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         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    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
           flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 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

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x1e9801
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: reading input file "C:\Users\Roy\AppData\Roaming\Arduino15\packages\arduino\hardware\avr\1.6.2/bootloaders/stk500v2/stk500boot_v2_mega2560.hex"
avrdude: writing flash (257918 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 257918 bytes of flash written
avrdude: verifying flash memory against C:\Users\Roy\AppData\Roaming\Arduino15\packages\arduino\hardware\avr\1.6.2/bootloaders/stk500v2/stk500boot_v2_mega2560.hex:
avrdude: load data flash data from input file C:\Users\Roy\AppData\Roaming\Arduino15\packages\arduino\hardware\avr\1.6.2/bootloaders/stk500v2/stk500boot_v2_mega2560.hex:
avrdude: input file C:\Users\Roy\AppData\Roaming\Arduino15\packages\arduino\hardware\avr\1.6.2/bootloaders/stk500v2/stk500boot_v2_mega2560.hex contains 257918 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 257918 bytes of flash verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.05s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:

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

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.
I think it worked...?

chucktodd

Just got the new board.  No hardware mods at all and here are the results:

I think it worked...?
Looks, good!  did it wake up?

Chuck.
Currently built mega http server, Now converting it to ESP32.

luckykid

Looks, good!  did it wake up?

Chuck.
It appears the boot loader worked on a new board from a new vendor that I got today.  Thank god I dual sourced the prototype.

I will be giving them to the actual programmer tonight to make some pin changes and test the remainder of functionality. 

The vendor who borked the first board is sending me a new and I should have it tomorrow.  I would prefer not to publish their info unless the board I get tomorrow is bad as well.  It's not right to be vocal if the first board is an outlier of their quality.

Thanks!

Go Up