[SOLVED]ProMini328-Programmer is not responsing but board detector res.-seems ok

Hi,

I have two Pro Mini 328 (3.3v ver.). One of them was connected to GPS sensor (Rx, Tx, Vcc, GND) and RF24+ breakeboard (SPI bus) powered by 1 cell LiPo battery.... And I forgot about that standalone schema for a day. I found it with almost fully discharged battery :roll_eyes:. a day later.

After that I can't upload sketch to the Pro Mini - Arduino IDE reports: Programmer is not responding. I've connect it through the another one Pro Mini via SPI bus and run Amtega Board detector sketch. It shows:

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 95 0F 
Processor = ATmega328P
Flash memory size = 32768
LFuse = FF 
HFuse = DA 
EFuse = FD 
Lock byte = CF 
Clock calibration = A5 
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 2048 bytes starting at 7800

Bootloader:

7800: 0C 94 34 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 
7810: 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 
7820: 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 
7830: 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 
7840: 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 
7850: 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 0C 94 51 3C 
7860: 0C 94 51 3C 0C 94 51 3C 11 24 1F BE CF EF D8 E0 
7870: DE BF CD BF 11 E0 A0 E0 B1 E0 EA E8 FF E7 02 C0 
7880: 05 90 0D 92 A2 30 B1 07 D9 F7 12 E0 A2 E0 B1 E0 
7890: 01 C0 1D 92 AD 30 B1 07 E1 F7 0E 94 2D 3D 0C 94 
78A0: C3 3F 0C 94 00 3C 98 2F 95 95 95 95 95 95 95 95 
78B0: 90 5D 8F 70 8A 30 7C F0 28 2F 29 5A 80 91 C0 00 
....
7F60: C7 CF 10 30 11 F0 02 96 E5 CF 11 24 80 91 C0 00 
7F70: 85 FF C5 CE C8 CE 8E E1 0E 94 C7 3C AE CD 85 E9 
7F80: 0E 94 C7 3C AA CD F8 94 FF CF 80 00 FF FF FF FF 
7F90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
7FA0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
7FB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
7FC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
7FD0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
7FE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
7FF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 

MD5 sum of bootloader = 27 EB 87 14 5D 45 D4 D8 41 44 52 CE 0A 2B 8C 5F 

First 256 bytes of program memory:

0: 0C 94 B2 00 0C 94 DA 00 0C 94 DA 00 0C 94 B8 02 
10: 0C 94 DC 02 0C 94 00 03 0C 94 DA 00 0C 94 DA 00 
20: 0C 94 DA 00 0C 94 DA 00 0C 94 DA 00 0C 94 DA 00 
30: 0C 94 DA 00 0C 94 DA 00 0C 94 DA 00 0C 94 DA 00 
40: 0C 94 0C 05 0C 94 DA 00 0C 94 7D 06 0C 94 C0 06 
50: 0C 94 DA 00 0C 94 DA 00 0C 94 DA 00 0C 94 DA 00 
60: 0C 94 DA 00 0C 94 DA 00 00 C2 01 00 01 00 05 00 
70: 05 00 03 00 00 E1 00 00 01 00 0F 00 0F 00 0D 00 
80: 00 96 00 00 02 00 19 00 1A 00 17 00 12 7A 00 00 
90: 07 00 20 00 21 00 1D 00 80 70 00 00 0B 00 23 00 
A0: 23 00 20 00 00 4B 00 00 14 00 37 00 37 00 34 00 
B0: 40 38 00 00 1E 00 4B 00 4B 00 48 00 80 25 00 00 
C0: 32 00 72 00 72 00 70 00 C0 12 00 00 6E 00 E9 00 
D0: E9 00 E6 00 60 09 00 00 E5 00 D8 01 D8 01 D5 01 
E0: B0 04 00 00 D3 01 B4 03 B4 03 B1 03 58 02 00 00 
F0: B4 03 67 07 67 07 62 07 2C 01 00 00 67 07 DD 0E

Considering this two things I supposed that something wrong with bootloader.

I've tried to upload bootloader through the working ProMini (using Arduino ISP sketch) but it also reports: Programmer is not responding.

Wiring: PC(linux), USB port - FDDI basic board - ProMini (working one) - Pro mini (bad)

Wiring between ProMini (working one) and Pro mini (bad) : 10 - RST 11 - 11 \ 12 - 12 | SPI bus 13 - 13 / VCC - VCC GND - GND

Second my ProMini ('working one' in description above) works fine.

Can someone suggest me what to do next? I have no Idea :~

I don't see why a dead battery would impact the bootloader. If you disconnect the battery while programming, does it work?

I've completely disassembled the schema when I found it. And I also cant understand how discharged battery could damage bootloader. May be an accident with discharged battery is not relevant to the issue. But before that accident I had no issues with sketch uploading to that ProMini. That's why I suppose that ProMini was somehow damaged in that accident but it is just my assumption (hypothesis).

Now I'm trying to upload bootloader to bad ProMini that has connections only as I've described above. Results of first step (fuses programming):

avrdude -P /dev/ttyUSB0 -b 19200 -c avrisp -p m328p -v -e -U efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m

avrdude: Version 5.11.1, compiled on Oct 30 2011 at 10:37:28
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

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

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : avrisp
         Overriding Baud Rate          : 19200
avrdude: stk500_recv(): programmer is not responding

avrdude done.  Thank you.

When I tried to upload any sketch - I've used only PC-FDDI-ProMini connection and nothing else.

BTW. I'm using Arduino IDE v.1.0.3 (64bit) on Xubuntu 13.04 (64 bit).

Hmmm... I've compared MD5 checksums from my results of Board detector with MD5 sums provided here: http://www.gammon.com.au/forum/?id=11633 and it seems that bootloader is OK.

I've oly found that some fuses are programmed not in that way as it described in boards.txt. boards.txt:

pro328.bootloader.low_fuses=0xFF pro328.bootloader.high_fuses=0xDA pro328.bootloader.extended_fuses=0x*05* pro328.bootloader.lock_bits=0x*0F*

Atmega board detector:

LFuse = FF HFuse = DA EFuse = FD Lock byte = CF

Self read signature sketch on my working ProMini shows

Signature detector. Written by Nick Gammon. Signature = 1E 95 0F Fuses Low = FF High = DA Ext = F8 Lock = CF

Processor = ATmega328P Flash memory size = 32768 Bootloader in use: Yes EEPROM preserved through erase: No Watchdog timer always on: No Bootloader is 2048 bytes starting at 7800

I'm not sure what those differences mean... :roll_eyes:

One more idea about damage.... May be Tx and/or Rx damaged and that's why I cant download sketch...

Can somebody suggest - how to check Tx/Rx (UART) in atmega328 if I have only SPI interface to it? I undarstsnd that SPI can be used to dowload anything to flash of atmega328, but I have no expirince to program&compile the code for atmega328.

Ha!
My second Arduino became unavailable for downloading a sketch… First I’ve became crazy - WTF is going on!!!

Second - I washed it with spirt and it starts to work. Spirt washing of second one was also resultative.

Great! The problem (as usual in the electronics) is one of two:

  • contact where it is not required or
  • no contact where it is required :slight_smile:
    (probably first one in my case).

Anyway, trying to solve the issue via software way I’ve learned a lot of things! :slight_smile: