1
\$\begingroup\$

I have this prototype pcb with an atmel avr atmega328p on it and it doesn't respond correctly to my AVRISP Mk2. From what i can tell the signature is wrong for that part.

Here is the output from avrdude:

[masterkraft0r@Masterkraft0r-HP14 ~]$ avrdude -p atmega328p -c avrisp2 -vvvv -F

avrdude: Version 6.3, compiled on Feb 21 2016 at 13:33:25
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/masterkraft0r/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : avrisp2
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200118683
avrdude: Sent: . [01] 
avrdude: Recv: . [01] . [00] . [0a] A [41] V [56] R [52] I [49] S [53] P [50] _ [5f] M [4d] K [4b] 2 [32] 
avrdude: stk500v2_getsync(): found AVRISP mkII programmer
         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
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel AVR ISP mkII
         Programmer Model: AVRISP mkII
avrdude: Sent: . [03] . [90] 
avrdude: Recv: . [03] . [00] . [01] 
avrdude: Sent: . [03] . [91] 
avrdude: Recv: . [03] . [00] . [01] 
avrdude: Sent: . [03] . [92] 
avrdude: Recv: . [03] . [00] . [18] 
         Hardware Version: 1
         Firmware Version Master : 1.24
avrdude: Sent: . [03] . [94] 
avrdude: Recv: . [03] . [00] ! [21] 
         Vtarget         : 3.3 V
avrdude: Sent: . [03] . [98] 
avrdude: Recv: . [03] . [00] . [06] 
         SCK period      : 8.00 us

avrdude: Sent: . [10] . [c8] d [64] . [19]   [20] . [00] S [53] . [03] . [ac] S [53] . [00] . [00] 
avrdude: Recv: . [10] . [c0] 
avrdude: stk500v2_command(): command failed
avrdude: Sent: . [03] . [a1] 
avrdude: Recv: . [03] . [00] . [00] 
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x48abfe
avrdude: Expected signature for ATmega328P is 1E 95 0F
avrdude: Sent: . [11] . [01] . [01] 
avrdude: Recv: . [11] . [00] 

avrdude done.  Thank you.

The interesting thing is also when I do this a few times in a row the last 4 digits of the device signature are always different.

What I have already done:

  • lowering the bitclock with -B; had no effect
  • checked all the connections; they're correct.
  • checked all the voltages; also correct
  • the device is a new one, so it can't be a fuse problem;
  • added a pullup (10k) on the reset line; still not working
  • charge pump + microcontroller = 1mA (see schematic)
  • programmer works and measures 3V3; was tested with a different board, same mcu

I will update this list with stuff that I tried

Does anybody have a clue what's going on here?

edit: schematic

Schematic

\$\endgroup\$
6
  • \$\begingroup\$ Do you have a pull-up resistor on the reset pin? \$\endgroup\$
    – user98663
    Sep 18 '16 at 15:18
  • \$\begingroup\$ i do now (10k) . did not change anything. \$\endgroup\$
    – Benjamin
    Sep 18 '16 at 15:29
  • \$\begingroup\$ You need to include a schematic of your board and of the programmer connections. Have you verified basics such as that the chip is getting powered and drawing a small non-zero current when not in reset? It would also be helpful to test the programmer setup against a known-good board. \$\endgroup\$ Sep 18 '16 at 15:52
  • \$\begingroup\$ * schematic is now in the op. * for current measurement i open the switch and measured between the common and the then open pin. current was 1mA. * programmer works on a atmega328p devboard i have. tested it right now. \$\endgroup\$
    – Benjamin
    Sep 18 '16 at 16:15
  • \$\begingroup\$ What voltage does the programmer itself measure on the circuit? Have you checked for bad solder joints? \$\endgroup\$
    – user98663
    Sep 19 '16 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.