Go Down

Topic: Pro Mini 168PA 3.3V - programmer issues (Read 456 times) previous topic - next topic

shutterfreak

May 28, 2020, 10:58 am Last Edit: May 28, 2020, 11:02 am by shutterfreak Reason: Replace rejected JPG attachments with PNG
I a currently working on a low-power embedded project for which I got a Pro Mini 168PA (8MHz, 3.3V) - see close-up photo for the details.


I installed the MiniCore board library in Arduino IDE to use it. I configured the board - see 2nd attachment.


First I tried programming it with an USB programmer (based on a Prolific P2303HXA, unfortunately without exposed DTR pin. That, alas, didn't work. I suppose the boot loader was missing.

Then I tried the "Arduino as ISP" approach depicted on this page. The probe wires use the same color scheme as in that article.

I configured the IDE as in the 2nd attachment and whenever I try to upload the boot loader, I get the following error:
Code: [Select]

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Users/shutterfreak/Library/Arduino15/packages/MiniCore/hardware/avr/2.0.5/avrdude.conf -v -patmega168p -cstk500v1 -P/dev/cu.wchusbserial14110 -b19200 -e -Ulock:w:0x3f:m -Uefuse:w:0xfd:m -Uhfuse:w:0xd5:m -Ulfuse:w:0b11110111:m

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/shutterfreak/Library/Arduino15/packages/MiniCore/hardware/avr/2.0.5/avrdude.conf"
         User configuration file is "/Users/shutterfreak/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.wchusbserial14110
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x15
         AVR Part                      : ATmega168P
         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        512    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     16384  128    128  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 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

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
         Hardware Version: 97994043
         Firmware Version: -370433968.32766
         Topcard         : STK502
         Vtarget         : 1.8 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done.  Thank you.

Error while burning bootloader.


What else can I do?

forbrains

Exactly this error occurs when powering the 5v board with some cheap CP2102 USB TTL adapters. They output 4.6v which drops to 4.3v during the Write / verification Read.

Check the power supply voltage on the Pro Mini "Raw" pin.

Obviously don't power yours with 5v, but do make sure that the voltage remains stable during programming.


If you are programming using GND, VCC, Rx and Tx remember to hold down the Reset button during the "Compiling" and release it when it says "Upload".

shutterfreak

Do I need to use a 5V/3.3V level converter when using the ArduinoISP sketch on a 5V Nano to program the 3.3V Pro mini?

CrossRoads

Yes, you should, if the Promini is powered at 3.3V. If connect 5V to its 5V pin, bypassing the regulator, then you don't need to.
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.

shutterfreak

I still can't get it to work.

I use an Arduino Nano 16MHz as ISP with the default Arduino ISP sketch.

By default it uses the "new" wiring (using the Rx & Tx pins, and by setting RST to GND).

I power the Pro Mini 168P @ 8MHz through the 3V3 pin from the Nano.

I use a level shifter: the A side is also powered through the 3V3 pin of the Nano, the B side through the 5V pin of the Nano.

The Rx and Tx pins of the Pro Mini are hooked to the level shifter's A side, the same pins of the Nano to the B side.

The power LED from the Pro Mini turns on but I'm still unable to either upload a sketch or burn a bootloader (MiniCore 168P)...

Is this due to the different clock rates (16MHz from the Nano programmer, 8MHz from the Pro Mini), or is there something else I have been overlooking?

Go Up