Cannot program AVR128DA64 by MPLAB SNAP-in programmer.

Go To Last Post
21 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi there,

I am getting a problem. I have purchased MPLAB snap-in programmer kit to program AVR128DA64. I have given the 5v supply to board the supply is 4.990volt. I have connected mplab snap-in 2,3,4(supply, gnd, updi) to mcu supply, gnd, and updi. In microchip studio, in programmer icon mplab-snap is showing connected, then I select MCU, after when I press the apply it asks to change pic mode to avr mode. When I press yes then after some time mplab snap-in connection get reset to the pc and then following error comes

Communication mode timeout.

in Mplab ide following error comes.

Data transmission failed. Error code -10121 returned while trying to receive USB data.

A communication error with the debug tool has occurred. The tool will be reset and should re-enumerate shortly.
Connection Failed.
 

I have removed the R48 resistor as per the guideline for Avr programming and connected the 4.7kohm resistor between supply and data.

This topic has a solution.

Madhusudan Jadhav

Last Edited: Sat. Oct 16, 2021 - 12:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Connect to MPLAB X IDE only once.

 

https://www.avrfreaks.net/forum/...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I seem to have had trouble when my SNAP was new, also.

 

Have a look here:  MPLAB® Snap Troubleshooting - Developer Help (microchipdeveloper.com)

 

IIRC, some SNAPs worked if one first selected a PIC micro, (not an AVR), and got the communications working with the MPLAB, and then switched to an AVR.

 

I, (and many others), had to jumper the Emergency Recovery Jumper and do a Boot Firmware Recovery process, (several steps, it guides you through them).

Since doing that it has worked fine.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
IIRC, some SNAPs worked if one first selected a PIC micro, (not an AVR), and got the communications working with the MPLAB, and then switched to an AVR.

 

Yes, this should fix it - fresh-from-fab SNAPs don't even know about "AVR mode" :| so they need to upgrade first in a PIC session.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, This solved my problem. now when I try to download the program. The error was coming cannot configuration bit. So I unchecked configuration bit in proprties. Now error is coming.

An illegal configuration parameter was used. (57)

Madhusudan Jadhav

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, so at this point, what version of debugger firmware is on there?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry for Late

Please find below details. It is coming in mplab x.

Connecting to MPLAB Snap...

Currently loaded versions:
Application version............1.9.223
Boot version...................01.00.00
Tool pack version .............1.8.552
Target voltage detected

Erasing...
An illegal configuration parameter was used. (57)
Programming did not complete.
 

Madhusudan Jadhav

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Following Error is coming in Microchip Studio 

 

Timestamp:    2021-10-14 18:08:49.874
Severity:        ERROR
ComponentId:    20100
StatusCode:    1
ModuleName:    TCF (TCF command: Device:startSession failed.)

An illegal configuration parameter was used. Debugger command Activate physical failed.
 

Madhusudan Jadhav

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ouch :/ 

Last 'check': are you using latest DFP for the Dx?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes

 

Madhusudan Jadhav

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which one is preferred?

 

Madhusudan Jadhav

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1.8.112 in mplab x

Madhusudan Jadhav

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xc8 compiler

Madhusudan Jadhav

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mysterious...

1) this error on activate _can_ be caused by electrical issues - its worth checking that board pullup mod and data line to the target for any debris that could be affecting signal quality

2) to help debugging the point of failure, it might be useful (if you are python savvy) to try pymcuprog and use -v debug logging

pip install --user pymcuprog

pymcuprog -d avr128da64 -v debug ping

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Concur on pull-up that can be split between the MPLAB Snap and the AVR128DA64 PCBA (too much pull results in lack of tri-state that's required for UPDI)

 

UPDI Enable | AVR® DA Family (Hi-Z)

TinyX-OCD (UPDI) Special Considerations | Atmel-ICE

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did the same pinout for UPDI pinout and there no pullup on the board except on mplab-snap between power and data 1 kohm. The voltage measured between data and gnd is 2 volt of mplab-snap without connecting to pc.

Now the error is 

PDI physical timed out. (25)

Snap requires an additional pullup resistor for the UPDI, TPI and PDI communication protocols. Please see the readme for more information.

Read did not complete.

Madhusudan Jadhav

Last Edited: Fri. Oct 15, 2021 - 05:19 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I put 2 resistors value of 680 ohm, one on snap and other on board where pins are attached to snap. now following error is coming.

Erasing...
Error code 25 received from the debugger
Verify device selection, interface settings, target power, security bit, and connections to the target device.
Programming did not complete.
 

Madhusudan Jadhav

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

project@embedchip.com wrote:
I put 2 resistors value of 680 ohm, one on snap and other on board

Please post your schematic, a picture is worth 1K words of description and much more accurate! 

 

 

Keys to wealth:

Invest for cash flow, not capital gains!

Wealth is attracted, not chased! 

Income is proportional to how many you serve!

Lets go Brandon!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Madhusudan Jadhav

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

Please post your schematic, a picture is worth 1K words of description and much more accurate! 

 

Not if you post a picture like #19

 

SNAP has been on the market for about 2 years.   If you make the hardware mod it should work fine with PDI and UPDI.

I have only used an external programmer with ATmega4808.

Otherwise I have used mega4809-XPRO, xmini-tiny817, curiosity-mega4809, curiosity-AVR128DB48 which all have on-board debuggers.

 

I doubt if the AVR128DA64 will behave differently to the 48-pin chips.

 

Please post a conventional schematic of your board.   And SNAP connections.

 

David.

Last Edited: Fri. Oct 15, 2021 - 08:37 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry, My mistake,

5v supply wasnot going to avr mcu supply pins. Silly mistake Boards tracks were open. So corrected it and now supply 5volt ok.

 Now I put only one 4.7 Kohm resistor on SNAP between data and supply.

Programmed OK.

Madhusudan Jadhav