MPLAB snap to atmega328pb program and debugWIRE

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

hi i want to know how to connect Microchips new programmer MPLAB SNAP to atmega328pb

i found the link below
i just want to sure is it works with MPLAB SNAP or not

Table 1 with refrance to AVR ISP (& Dw)

http://microchipdeveloper.com/pi...

and also what is pin2 connect to VTG?

and is its possible to debug atmega328pb with MPLAB SNAP using reset pin of microcontroller

as per datasheet says under DBG - debugWIRE On-chip Debug System heading?

if so how to?

If you looking for piece then prepare for war.

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

Well according to the table in the product sheet the Snap should support AVR: http://ww1.microchip.com/downloa...

 

"VTG" typically means Vtarget or simply the supply voltage of the target MCU.

 

Also regarding debugging - it does look like Snap supports debugging of AVR through debugWire, but I have not tried it myself. It's probably like Schrödinger's cat - you cannot really know until you try it.

/Jakob Selbing

Last Edited: Sun. Jan 27, 2019 - 01:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It should work exactly the same as any other debugWIRE chip.
Connect all the ISP lines, VCC, GND.
Make sure that there are no capacitors on the RST/dW pin. Any external pullup must be 10k or higher. No pullup is fine.
.
Follow tutorials for mega328P. The 328PB should work the same.
.
I do not have a SNAP. I am sure that it will work fine. I would be interested to hear how fast debugWIRE is for load and debug.
ATMEL-ICE is reasonable. XMINI is very SLOW.
.
David.

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

MPLABX 5.05 didn't work well or at all with DW, 5.10 is supposed to work but I'm too lazy to try, maybe wait for v6.0. wink

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

js wrote:

MPLABX 5.05 didn't work well or at all with DW, 5.10 is supposed to work but I'm too lazy to try, maybe wait for v6.0. wink

 

But, but, Microchip expects you to test their Alpha release software they release  cool

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

AHA!! But when you reach my age and prefer cruising, holidaying or even gardening some things become low priorities.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

So, I ordered a Snap programmer.

It should program my Nano clone M328P chips.

 

It arrived today, that was mighty fast as I just ordered them a day or two ago.

 

Of course, today the MC site, once I found the page that lists their IDEs, won't let me download the MPLab X IDE, even after I signed in with my MC account.

 

I get an error: "The website declined to show this webpage".

 

sigh.

 

Studio 7 takes forever to download, but at least Atmel let me do so...

 

How frustrating.

 

Not a good start with this device.

 

JC

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

DocJC wrote:

Of course, today the MC site, once I found the page that lists their IDEs, won't let me download the MPLab X IDE, even after I signed in with my MC account.

I get an error: "The website declined to show this webpage".

 

 My bet is they block any and all connection attempts from the state of oHIo

 

They are doing site changes so give it a bit and try again

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

My bet is they block any and all connection attempts from the state of Ohio

Funny!

 

JC 

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

So, the Out-Of-Box experience is continuing to go downhill fast.

 

The MC web site eventually let me download MPLab X IDE.

 

I plug in my new SNAP programmer (USB) and Windows goes "ding", so far life is looking good.

 

But, unfortunately, I can't find a way to select my programming hardware.

I select what I think is a good option to select a programmer and download a file and I can't find the right options.

So I read through the startup / new user manual and it doesn't answer my questions.

 

So I go to the MC Forum, and attempt to use my AVRFreaks Login, which IIRC we were told were all registered at the MC site to make it seamless for us, (back in the days when Michael was still around).

But no luck.

So I create a new log in ID and find the SNAP sub-Forum but I can't post a question, because my new account has to be approved...

 

Eventually I load the MPLab X IPE instead of the MPLab X IDE and it has recognized my new SNAP Programmer.

 

Life is looking good, again.

 

So,  let's look for how to connect the 8 In-Line pins on the SNAP programmer to a generic Mega328P, (actually a Nano with a 2x3 ISP Header).

And let's look some more.

And let's try a little Google'ing.

And let's follow a link or two to totally useless "information" pages...

 

And lets call it a night before my blood pressure goes through the ceiling.

 

Electronics / micros is suppose to be what I do to relax after a long day in my other job.

 

Not too relaxing interacting with the new Over Lords and their web site this evening.

 

I expected better.

 

Four+ hours or so invested in this and I still haven't even flashed an LED on a Nano...

 

</vent>

 

JC

Last Edited: Fri. Feb 22, 2019 - 04:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:

So,  let's look for how to connect the 8 In-Line pins on the SNAP programmer to a generic Mega328P, (actually a Nano with a 2x3 ISP Header).

 

Any use?...

 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

I do not own a SNAP.

I do own a PicKIT-4.

 

The first job is to make an adapter from 8x1 to the Atmel-style 3x2 and 5x2 JTAG.

I did this with 8x1 angle header,  3x2, and 5x2 box header and a small piece of protoboard.

 

This means that you can use a regular 6-way ribbon for ISP, PDI, UPDI, ... and a regular 10-way ribbon for JTAG.

Without any fear of wrong wiring.

 

The PicKIT-4 was recognised by Windoze.

Runs fine with MPLAB or AS7.

 

I would expect the SNAP to be equally painless.  i.e. with up to date MPLAB or AS7.

 

I am surprised that we have not heard much about SNAP.    I expected that several members would have already bought SNAP.

It is incredibly cheap.    It seems to do everything that ATMEL-ICE can do.    Just with inconvenient connector and missing case.

 

David.

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

DocJC wrote:
I select what I think is a good option to select a programmer and download a file and I can't find the right options.
mEDBG?

DocJC wrote:
Electronics / micros is suppose to be what I do to relax after a long day in my other job.
day job

When did electronics and embedded systems design become relaxing?

(from one who missed that boat)

 


https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=5#comment-2643626

 

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

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

Another instance of the information in your post plus DGI :

MPLAB® PICkit™ 4 Debugger Pinouts for Interfaces - Developer Help

due to MPLAB® Snap Pinout Information - Developer Help

 

edit: Table 1's Module line needs an edit.

 

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

Last Edited: Fri. Feb 22, 2019 - 02:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
It is incredibly cheap.
Instead, would you consider inexpensive? smiley

https://www.avrfreaks.net/forum/mplab-snap#comment-2631221

david.prentice wrote:
It seems to do everything that ATMEL-ICE can do.
MPLAB X v5.15 device support :

SAM E70, MPLAB Snap

SAM E70Q21, both

SAM S70, MPLAB Snap

SAM V70, MPLAB Snap

SAM V71, MPLAB Snap

SAM V71Q21, both

Arm Cortex-M23 (SAM L10 and L11), Atmel-ICE

AVR :

XMEGA, Atmel-ICE and MPLAB PICkit 4

Otherwise, MPLAB Snap has very good coverage when compared to Atmel-ICE's complete coverage.

btw, MPLAB Snap covers almost all of dsPIC33C ('18's new dsPIC)

david.prentice wrote:
Just with inconvenient connector ...
for some Microchip boards.

Tag-Connect has their MPLAB PICkit 3 product (6 pins) that should be a match for MPLAB Snap debugWIRE :

Tag-Connect Solutions for Microchip PICkit 3 - Tag Connect

david.prentice wrote:
... and missing case.
Maybe not for long due to the near ubiquity of 3D printers.

 

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

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

Surely "inexpensive" is just a posh way of saying "cheap".

 

I can buy the SNAP for £8.75 + £1.75 VAT from Farnell.   It would arrive at my door tomorrow.

I can buy the SNAP for £8.71 + £5.13 delivery + £2.77 VAT  from Microchip with the discount.    Expected 26 February.

 

Yes,   it is very inexpensive from Farnell.    There is a minimum charge for non-account holders.

 

IMHO,    any tools need to have standard cables with standard connectors.

Microchip boards expect a 8x1 connector or similar. 

Atmel boards expect 3x2 or 5x2 connectors in 2.54mm or 1.27mm pitch

 

I do not have a 3-D printer.   But that would be an excellent solution.

 

I have too many tools.   It would be interesting to hear from a SNAP owner.

I would expect it to appear as an EDBG device rather than mEDBG.   Either way,   I would like to compare performance with regular EDBG.

 

David.

Last Edited: Fri. Feb 22, 2019 - 03:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
IMHO,    any tools need to have standard cables with standard connectors.

MPLAB® Snap Additional Items Needed - Developer Help

...

  • a full-featured Micro-B USB cable (data and power), no longer than 1.5 meters, to connect to a computer (e.g., the Microchip Part Number ATUSBMICROCABLE-XPRO)

...

 

edit : https://new.microchipdirect.com/product/search/all/ATUSBMICROCABLE

 

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

Last Edited: Fri. Feb 22, 2019 - 04:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow, Brian's table has the AVR ISP pinout conversion, (MISO, MOSI, SCK), in the table.

I am sure I found many similar tables but without the AVR ISP column.

Perhaps they were early versions, before the AVR's were added to the capability of the firmware.

 

Regarding using the SNAP with Xmega's, there is a three colored chart of supported chips and NONE of the Xmegas were listed as currently supported, although some of the literature says the programmer supports the PDI interface...

So it does but it doesn't support the Xmegas...

 

I'm a happy camper again, with Brian's table.

Off to the basement to make a converter/jumper cable and give it a try.

 

Side comment, (after already hijacking this Thread...):

Those who don't learn from History are destine to repeat it.

 

Atmel built the original Dragon without mounting holes.

For an open PCB design for which the end user generally had to fabricate their own case that was a hassle.

Atmel learned, and when they came out with the Dragon V2 PCB it had mounting holes!

 

Apparently none of the design group from the Dragon sat at the table when they spec'd out the SNAP, as it has no mounting holes.

Having them would have made making a 3-D printed case so much easier than simply trying to lock in the PCB by its edges. especially with R5 and R10 1/2 mm from the edge of the board.

 

GChapman's link to the PicKit4 Developer's guide also has the AVR ISP pinout within the table.

Truly, yesterday before my rant, I followed several different links to the PicKit4 device info, and it showed a table devoid of the AVRISP info.

That, in fact, is specifically what led to my original comment about useless data links / information pages.

 

I appreciate everyone's comments and input!

 

JC

Last Edited: Fri. Feb 22, 2019 - 05:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is silly.   You can buy a Micro-B USB cable at your local supermarket.

 

Buying ribbon cable,  IDC connectors,  header pins, box headers, ... are not available over the shop counter.

I have all these parts.   I suspect that DocJ has them too.    All available via Ebay.

 

Connecting a UPDI or JTAG target needs to have the correct pins.

 

Yes,   I know that the SNAP is intentionally designed to be the cheapest debugger that can be manufactured.

Making an Atmel "adapter" is simple.    It transforms the PICkit-4 (or SNAP) into an excellent tool.

 

YMMV

 

David.

Last Edited: Fri. Feb 22, 2019 - 05:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I *think* I found my table on some Microchip wiki thing I stumbled across.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

DocJC wrote:
Off to the basement to make a converter/jumper cable and give it a try.
May you have joy

DocJC wrote:
Having them would have made making a 3-D printed case so much easier than simply trying to lock in the PCB by its edges. especially with R5 and R10 1/2 mm from the edge of the board.
picture in this thread's post 1, R5 and R10 at top right :

MPLAB Snap | AVR Freaks

USB dongles are small and some don't have mounting holes due to having to fill the available space with at least minimally essential parts; creating injection molds for such cases is a difficult task.

A case by a 3-D printer may have enough capture of the MPLAB SNAP PCBA by the micro USB type-B connector and the SIL connector; maybe those two connectors will be anchored in the PCB design and be configuration controlled.

The ones at Microchip might not consider an injection-molded case for MPLAB Snap because it must not be at a loss (MCU profit centers)

Am thankful of MPLAB Snap being on a somewhat periodic sale.

 


Delivery Date of Nitrokey Storage and Other News | Nitrokey

(second paragraph)

Background: Why is a simple piece of plastic such an issue? Developing a simple plastic case can be an extremely expensive, complicated and time-consuming process. ...

PowerStream Polymer Products injection molding, mold design, and injection mold production in Utah Valley, Orem UT

fyi, some injection molding machine operators in the US earn approximately 10USD/hour.

 

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

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

david.prentice wrote:
This is silly.   You can buy a Micro-B USB cable at your local supermarket.
Some of the issues in this fora are corrected by ones replacing the USB cable (inadequate strain relief due to inadequate overmold, one miss-pulls the cable, the device fell onto the floor "butter-side down" [sheared USB connectors, jerked USB cable])

A new arrival at Mouser though only some of the USB 3 cables are in-stock; USB 2 micro-B arrive 25-Feb'19 (1m) and 3-May'19 (1.5m) :

USB Cable Assemblies - Molex | Mouser

fyi, a USB speed issue (debugger firmware updates by USB 3 SuperSpeed or USB 2 High-Speed)

file : MPLAB X v5.15, Readme for MPLAB Snap.htm

9.3       Other Tool SSRs (System Service Requests)

The following is a list of issues that are being tracked for other tools but are related to this tool.

PK4-31

The firmware update will fail with either the MPLAB PICkit 4 or the MPLAB Snap ICD tool, when using:

- USB Full-speed port 
- USB Full-speed hub 
- USB Full-speed isolator

Workaround:

The tool would have to be plugged into a USB Full-speed or USB SuperSpeed USB port/hub/isolator to allow the firmware update process to complete successfully.

After the firmware update completes, the tool can then be plugged back into a USB Full-speed port/hub/isolator.

 

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

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

OK, I'm an unhappy camper, again.

Out-of-the-Box experience with the MC SNAP continues on a downward spiral.

 

MPLab X IPE v5.15 downloaded fine on my Win10 desktop.

Plug in the SNAP, using any of 4 different USB cables, and Windows goes Ding, and the Device Manager shows that it is a MC device, installed, and working.

The IPE shows the SNAP and its serial number in the Tool window.

 

I select M328P from the pull down list in the Device box, and click apply, and I get a yellow dot adjacent the Device box.

 

I click Connect and I always get an error:

 

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 actually purchased a couple of SNAPS, and all of them give the same error message.

 

As the IPE listed the SNAP and its serial number, one would think that the software successfully located and communicated with the programmer, (unless it simply read the info from a Win 10 USB connected device list).

 

I did wire up a 8-Pin in-line to 2x3 Pin female AVR ISP adapter cable.

That took only a few minutes.

When things failed I then rechecked what is suppose to connect to what, and I have it correct, per the table above.

The target Nano is good, and externally powered, as I can program it fine through Studio 7 and an AVR ISP MkII.

 

I suspect that the IPE isn't communicating with the SNAP, however, and that I haven't even gotten to the point of the SNAP communicating to the micro.

 

Four MORE hours spent on this and I still haven't flashed an LED.

 

Frustrated and disappointed...

 

I did, BTW, post a Thread in the MC Forum, SNAP sub-forum.

But as a new member my post has to be approved by a Moderator.

 

JC 

 

Edit:  If a Moderator wanted to split this into its own Thread that would be fine.

When I tacked onto the SNAP Thread I didn't envision this being such an agonizing process.

Topic: SNAP Programmer setup issue.

 

Thanks, JC

 

 

Last Edited: Fri. Feb 22, 2019 - 09:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jay,

 

Please connect to a regular Uno or any other AVR board.

 

The Nano and especially Chinese Nanos have stupidly strong 1k0 pullups on the /RESET line.

 

I will dig out a Nano and see how the PICkit4 gets on.   From memory,   one Atmel programmer did not like a Nano.

And obviously there is no need to ever use an external programmer.   The Nano comes with a proper Bootloader.

 

David.

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

Hi David,

 

Good thought.

Unfortunately it resulted in the same error.

 

I connected it to an Uno, again a known good board that programs fine with my usual programmers.

Windows disconnects the device, then reconnects it, but the "connection failed" error persists.

 

Edit:

I also tried it on a custom PCB, M328PB,  ext 10K pullup.

I changed the chip in the IPE, and the Connect action fails similarly to both of the above.

Windows disconnects, reconnects, but the Connection Faired error persists.

 

JC

 

Last Edited: Fri. Feb 22, 2019 - 10:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Both STK500 and PICkit4 could read ID in AS7.

 

MPLABX IPE v5.10 seems very odd.   It took a long time to read ID and to read 32kB Flash.

I had never used the IPE.    I only used IDE v5.10

 

I will install MPLABX v5.15

 

David.

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

I installed v5.15

 

IPE "connects" to the PICkit4 in 12 secs.

It reads 32kB Flash in 14 secs.

 

IPE detects a mega4809-Curiosity board.    But it refuses to connect.

IDE recognises the Curiosity board.  It attempts to upgrade nEDBG firmware but fails.

 

I will try the 4809 project in AS7.

 

David.

 

Edit.   AS7 was quite happy with the Curiosity.    However it reported v1.0.2 firmware on Tool,  v1.0.1 firmware on Disk.

MPLABX might have invented the v1.0.2.   Obviously AS7 only knows v1.0.1

 

Last Edited: Sat. Feb 23, 2019 - 12:05 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi David,

Thank you for spending the time to give this a try.

It makes me feel better to know that I am not just missing something simple on the User Interface to make it suddenly work.

But still quite frustrating that you can't make it work, either.

 

When you connected to the Curiosity with Studio 7, what were you using for your hardware programmer device?

I didn't see anywhere in what I read that Studio would support the SNAP, and when I tried it my setup didn't recognize it or connect to it as a programmer.

I assume you were using a classic AVR programmer with Studio to connect to the Curiosity board.

 

Also, were you running v5.15 under Windows, Linux, or Mac?

 

Thanks,

 

JC

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

So I looked at a list, (partially shown below, I couldn't make a link work), of SNAP supported devices and the AVR M328P and M328PB are YELLOW, meaning preliminary , Beta support.

Now I could swear that before I ordered the SNAPS I looked at a similar page that showed they were GREEN, fully supported, (and confirming that it wasn't an Xmega32E5 programmer, (RED)).

Since my last two projects used the M328P and M328PB I thought I'd give it a try.

 

The M4809 is also YELLOW listed, so I guess not too surprising David's board didn't connect either.

 

I think their marketing department's comments that the SNAP now supports AVR's is a bit mis-leading to say the least.

The only Mega's with a Green color are under the "SIMISA" tool, there are no Green ones under the SNAPD or SNAPP.

 

I have found the Microchip web site to be very slow to load, and at least the way my brain works, I've found it very difficult to find what I'm looking for.

 

I also think there are several versions of their various documents link to by different pages, and a lot of inconsistencies.

 

JC

 

Edit:Typo

 

Link to the full list fails...

Add it to the list of special user features provided by Microchip...

Partial list below:

 

 

 

 

Last Edited: Sat. Feb 23, 2019 - 01:03 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am running AS7.0.1931 on this Win10-64 Desktop PC.   Pack Manager says that packs are up to date.

And MPLABX v5.15

 

It looks as if v5.15 will not work on my elderly Win7-32 Laptop PC.

However v5.10 does work on Win7-32.

 

The 4809-Curiosity comes with an onboard UPDI debugger (nEDBG).

The original 4809 project ran on 4809-XPRO.   Again,  this has an onboard EDBG debugger.

 

I can probably disable the onboard debuggers.   But personally I find life much easier with onboard tools.    It means a single USB cable.

 

Quite honestly,   I would expect the SNAP to work straight out of the box.    After all,  it is probably a PICkit4 under the hood.

Ah-ha.   Brits say "under the hood" and not "under the bonnet".

 

If I did not already have an ATMEL-ICE and PICkit4,   I would certainly buy a SNAP.

I am a little gobsmacked that many readers have not bought a SNAP yet.

 

Wait 24 hours.    There must be SNAP owners out there.

 

David.

Last Edited: Sat. Feb 23, 2019 - 12:53 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, I ordered a Snap programmer.

It should program my Nano clone M328P chips.

Did you make the modifications needed to your Nano clone to work with debugWire?  The Arduino reset circuitry will interfere with debugWire - you need to disconnected the "auto-reset" capacitor (there may be a "jumper" for this), andIIRC many Nanos have an overly strong pullup resistor on reset (1k instead of the normal 10k.)  Arduinos are not the best systems to try to use with "real tools."  (I'd recommend an Xplained Mini.)

 

 

Out-of-the-Box experience with the MC SNAP continues on a downward spiral.

I don't think I have ever seen a "professional IDE" with what I would call a "good" out-of-box experience.  Even if one has "significant experience" with largely similar IDEs, each vendor seems to throw in enough of their own requirements and customizations to make for a wasted day or two getting things to a usable state.  :-(   This is why the Arduino IDE has been such a success, in spite of its lack of capabilities (IMO.)

 

 

I can't find a way to select my programming hardware.

Are you trying to select the programming hardware on a "global" basis?  AFAIK, in MPLAB you can only select the debug tool as part of a particular "project" configuration...

 

MPLAB X Project configuration

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

I am late to the party as I was spending a couple days having fun outdoors with my son......

 

I have three MPLAB SNAP In Circuit DEbuggers sitting in front of me, is that what the topic is?  Whats the issue and I will try them out as I have not opened one yet.  I will start looking through the thread in the meantime

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

I do own a PicKIT-4.

 

The first job is to make an adapter

Didn't yours come with the adapter board for just about anything for the PICKKIT4? Or was it supplied to just us , the illuminati? devil

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Westfw,

Actually, I wasn't going to use the debug feature, I just wanted to download a hex file.

I've not had any problems programming the Nano Clone with my AVR ISP mkII, or the Atmel Flash programmer, but I guess there could still be an issue with it's reset circuitry.

I'll have to poke around and see what parts are on the little Nano Clone PCB.

 

I found the IDE confusing, but truth be known I didn't start off by loading a project.. etc.

 

The IPE interface seems very intuitive, if it would just work...

 

See the edited post of mine above, Post #29.

I suspect, at this point, the problem is simply that Microchip hasn't provided support for the M328P or M328PB, (or perhaps hasn't really got the AVR ISP interface up and running at all, for any of the chips???).

 

I did try the SNAP on a M328PB, custom PCB, without any Arduino reset circuitry, (it does have a 10K pull-up n the reset pin).

It failed like the Nano with its M328P.

 

We'll see if Jim can get a Windows MPLab X IPE v5.15 and SANP configuration to work with an AVR.

 

Thanks, everyone,

 

JC

 

Edit:Typo

Last Edited: Sat. Feb 23, 2019 - 01:44 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well I just downloaded and installed a fresh copy of MPLAB to my new Win10 pro machine and I realised that I already had version 5.10 on the machine....oops.  and MPLAB for some reason is incapable of updating itself....it just downloads a whole new installation and that means I have to download new compilers etc...pain in the ass.

 

I can see the SNAP in the IPE, but cannot connect to it

 

Will work on this some more

 

Jim

 

EDIT:

Every time I try connecting to teh SNAP, it disconnects, then reconnects and I get a data transmission failure in the IPE status window

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Last Edited: Sat. Feb 23, 2019 - 02:47 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Doc,

How are you connecting the SNAP to the target?  From what I am reading about the SNAP it only has two data lines on the SIL connector.  I see what looks like SPI points int eh board elsewhere

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Ok, here is what I have so far

 

My target is a Mega328P sitting on an STK600  It is not protected, nor is it in debugwire mode

 

Tools:

AVRStudio7

MPLAB 5.15

MPIPE 5.15

 

Atmel ICE

PickKit4 with adapter board

SNAP debugger

 

Here is what I have observed:

 

Using Studio7

Atmel ICE - Connects to Studio, can read, program and debug Mega328

PickKit4 - Connects to studio, I cannot connect to target because I do not have proper adapter - one that comes with PickKit4 does not include adapter connection for 8 pin MicroSIL connector

SNAP - is not recognised by Studio

 

 

Using MpIDE 5.15

Atmel ICE - Is recognised and connects to MPIPE.  Allows me to program, erase and read part.  I cannot change fuse settings(I may be missing something on how to change fuse settings)

PickKit4 - Sees programmer.  WIll not allow connection because it does not see target voltage.  I cannot connect to target because I do not have proper adapter - one that comes with PickKit4 does not include adapter connection for 8 pin MicroSIL connector

 

SNAP - Sees snap WIll not allow connection because it does not see target voltage.  I cannot connect to target because I do not have proper adapter - one that comes with PickKit4 does not include adapter connection for 8 pin MicroSIL connector

 

All told this was not as successful as I had hoped. 

 

Will work on this more tomorrow

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Hi Jim,

 

Thank you for your time and interest.

 

I did not try my Atmal Flash programmer with MPLab X.

My goal was to get the new SNAP programmer up and running with MPLab X IPE v5.15

 

Brian's Post #11 has a connectivity table, which matches that in GChapman's Post #14 link (Developer's Help).

 

So I wired up a converter / connector cable to connect the SNAP to a "Standard" AVR ISP 2x3 Header.

I have a male 8 Pin in-line header  plugged into the SNAP, with a ribbon cable to a 2-3 female connector, which can then plug onto a standard 2x3 Mail ISP programming Header.

 

SNAP 8 Pin  ------> AVR ISP 2x3

#1  -->  NC

#2  -->  #2  Vtg

#3  -->  #6  Gnd

#4  -->  #1  MISO

#5  -->  #3  SCK

#6  -->  #5  Reset\

#7  -->  #4  MOSI

 

Post #23 has the error I get with MPLab X IPE:

 

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.

 

Windows disconnects and reconnects the SNAP, but I can't CONNECT to the micro.

 

Same failure mode with:

A M328P on a Clone Nano

A M328P on a custom PCB

A M328PB on a custom PCB

 

All three of the above work fine with Studio 7 and an AVR ISP mkII.

 

It would be nice to know if anyone has a working setup with Windows 10, MPLAB X IPE, and a SNAP programmer connecting via ISP to an AVR Mega chip.

 

I'm beginning to think the listing in Post #29 that says the Megas and Tinies are YELLOW means they are not currently supported at all.

 

Thankyou, again, everyone, for your input and suggestions!

 

JC

 

 

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

DocJC wrote:
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 get the same error when I accidentally used an adaptor I thought would work.

 

I will set up something tomorrow and see what I get. I also have a thread running in the Microchip forums to make sure I have things set up correctly.  Lets see if anyone answers.......

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

I think that AVRs are the Cinderellas in the Microchip family now, the ugly sisters (PICs) and the step mother (Microchip) are trying to discourage users from using AVRs. devil

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I am gobsmacked.   There is nothing complicated with AVR ISP (SPI) programming.

 

The PICkit4 knows how to do ISP, JTAG, PDI, ...

The PICkit4 knows how to talk to USB.

 

I can see no reason for SNAP to have any problems with USB or with the hardware programming protocols.

The debugger protocols should be ok.    As PICkit4 irons out any "features",   the fixes would immediately migrate to a corresponding SNAP firmware release.

 

Likewise,   any MPLABX "debug features" will get ironed out too.

At least we have a robust AS7.    I am sure that MPLABX will get there shortly.

 

@Jay,

Your message arrived on the wrong day.    I assumed that other readers would get you going within hours.

If I had realised I probably would have just bought a SNAP immediately (even if I already have too many tools)

 

The SNAP has been on the market for several months.    It must work with regular PIC16, PIC18, PIC24, PIC32, ...

I can test PIC18

I can test AVR:  ISP, PDI, JTAG, TPI

I can test ARM:  SWD, JTAG

 

David.

Last Edited: Sat. Feb 23, 2019 - 10:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seems everyone got one (or more) of the damn thingies. I did too.

I'm testing with an AVR 0/1 series (tiny1616), and got the same error:

 

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.

 

There was no activity on the UPDI pin, so the error originates even before any communication with the target is attempted.

 

Then, I set the protocol to ARM. The tool uploaded some firmware, something that never happened with the AVR. So, I thought, "yeah, we're getting somewere!". There was activity on the data lines, of course it didn't detect a target because I didn't connect one.

 

So, I set the protocol back to UPDI, this time some firmware is uploaded to the tool, now the UPDI line shows signs of life and I have a new error:

 

PDI physical timed out. (25)
Snap requires an additional pullup resistor for the UPDI communication protocol. Please see the readme for more information.

Read did not complete.
 

So I think I'm getting somewhere, but now it's lunch time, can't work on an empty belly. Then I'll take a look at that readme (if I can find it, that is).

 

So my first conclusion is that Snap uploads specific firmware each time a new protocol is needed. But this is failing for AVRs for some reason, unless you upload some other protocol first. ARM worked here.

Last Edited: Sat. Feb 23, 2019 - 01:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But this is failing for AVRs for some reason

See #40

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

So my first conclusion is that Snap uploads specific firmware each time a new protocol is needed. But this is failing for AVRs for some reason, unless you upload some other protocol first. ARM worked here.

Yes and no, the firmware is switched when changing between AVRs and PIC. No firmware upload though, just a switch. The AVR firmware is a derivative of the Atmel-ICE firmware.

 

See #40

Awww... 

 

I'm beginning to think the listing in Post #29 that says the Megas and Tinies are YELLOW means they are not currently supported at all

Yellow has the same meaning as it has had in MPLAB X. The  -10121  error is a USB level error... 

 

Atmel ICE - Is recognised and connects to MPIPE.  Allows me to program, erase and read part.  I cannot change fuse settings(I may be missing something on how to change fuse settings

Wrong interface maybe? Only ISP on that part can change fuses... 

 

 

And, use MPLAB X 5.15. We did a lot of improvements, especially on the ISP and debugWIRE handling in it  smiley

 

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

El Tangas wrote:
Then I'll take a look at that readme (if I can find it, that is).
MPLAB X v5.15, release notes, Readme for MPLAB Snap.htm :

10    Important Notes

...

10.2   AVR UPDI Support

A 1K ohm pull-up resistor must be installed between the MPLAB Snap ICD ICSP connector's (PCB reference designator J4) pin 4 (PGD) and pin 2 (Vdd) to allow proper UPDI programming/debugging support for AVR parts that support the UPDI interface.

Note: If this 1K ohm pull-up resistor is not installed a 'PDI physical timed out. (25)' message will be issued for various operations in the MPLAB X IDE or MPLAB X IPE GUI.

...

Wow!

An order of magnitude better drive than an Atmel-ICE.

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

...

  • Pull-up resistors on the UPDI line must not be smaller (stronger) than 10kΩ. A pull-down resistor should not be used, or it should be removed when using UPDI. The UPDI physical is push-pull capable, so only a weak pull-up resistor is required to prevent false start bit triggering when the line is idle.

...

Atmel AVRISP mkII is 4.7K ohms minimum.

 

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

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

Used my snap for the first time today with the v5.15 MPLAB IPE on Linux- took 3 hours to get it to talk to a PIC16.

 

I've managed to get it to connect to and read the fuses from a tiny1614 (not tried programming it yet) - I was getting 'PDI physical timed out. (25)' errors to start with - seems you need to use a pull up (from '/opt/microchip/mplabx/v5.15/docs/Readme for MPLAB Snap.htm'):

 

A 1K ohm pull-up resistor must be installed between the MPLAB Snap ICD ICSP connector's (PCB reference designator J4) pin 4 (PGD) and pin 2 (Vdd) to allow proper UPDI programming/debugging support for AVR parts that support the UPDI interface.

 

Edit: Beaten by gchapman. I did try using a 10K resistor before I found the readme and still got the PDI timeout errors. A 1K resistor worked.

Last Edited: Sat. Feb 23, 2019 - 08:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And, use MPLAB X 5.15.

Will need to try it with the PickKit4 but before then will need to get a lager SSD on my computer, the old one is pretty full and I need to keep on deleting things to install others. See what disasters the upgrade will bring.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

And, Jim, for your question on the MPLAB forum:

Second question - I would like to start using MPLAB with the AVR processors.  When I installed 5.15 I also downloaded all of the AVR related files and the all seem to be extensions/add ons but I do not seem to see how to install them within MPLAB.  They are not installation files I know that.

Either use XC8 (available and installable from microchip.com), or if you have Atmel Studio installed then the avr-gcc from it should be automatically detected. If you have a zip of avr-gcc from microchip.com, then you need to add it. See http://microchipdeveloper.com/mp... for how. Note that currently, a upstream avr-gcc will not detect correctly and will be listed as v1.0, so it is easier to use a Atmel/Microchip built version of the compiler until we can sort that one out... 

 

I had version 5.10 on the machine and decided to upgrade to 5.15.  But it seems that there is no way to update from within MPLAB.  I have to do a full install, load the complier(XC8) and then add the add ons.  Am I missing something?  Is there a way for MPLAB to update itself without installing a whole new copy, and then deleting the old one?  I would think it could.

Not sure what addons your talking about, but when you have downloaded a new version, then on first start it should ask you if you want to migrate settings etc over from the older version. MPLAB X does not upgrade in the Atmel Studio sense (or, technically it does, but the versioning is different, MPLAB has up until now version on major+ minor, while Atmel Studio versions on major+minor+build. The policy for side-by-side installtion of minor versions is the same for Atmel Studio and MPLAB X). 

 

 Code Configurator and when I launch it I get a pop up telling me that the projects device is not supported.  I am trying the Mega328p for the test.

As mentioned over there, the device support schedule for MCC is not the same as MPLAB X, so while MPLAB X has support for most AVRs now, MCC is still working on it...

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

Last Edited: Sat. Feb 23, 2019 - 08:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

meolsen wrote:
Awww...
A thank you to you and all for unified memory AVR, and its ecosystem, for 5V AVR have a place.

May y'all continue that roll.

 

P.S.

cheeky

Thursday's press release :

Connect PIC® MCU Applications to Google Cloud in Minutes with Microchip’s New Development Board for Cloud IoT Core | Microchip Technology

edit :

PIC-IoT WG Development Board (AC164164) - Microchip Technology | Mouser

 

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

Last Edited: Wed. Feb 27, 2019 - 12:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's not a race ... synchronicity

Thank you for the 1K ohms confirmation; am still surprised.

 

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

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

meolsen wrote:
And, Jim, for your question on the MPLAB forum:

DAMN!! LOL!! laugh

 

Yeah I noticed that it picked up on GCC from Studio about an hour after I wrote that OP.  BUT, if MPLABX detects GCC in Studio and installs from that I should be good to go then correct?

 

meolsen wrote:
Not sure what addons your talking about, but when you have downloaded a new version, then on first start it should ask you if you want to migrate settings etc over from the older version.

It did not.  What I am typing about are the plugins.

 

meolsen wrote:
MPLAB X does not upgrade in the Atmel Studio sense......

No kidding, having two full versions of MPLABX on my machine takes quite a bit of space.

 

meolsen wrote:
As mentioned over there, the device support schedule for MCC is not the same as MPLAB X, so while MPLAB X has support for most AVRs now, MCC is still working on it...

Fair enough.  THanks

 

JIm

 

 

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

No kidding, having two full versions of MPLABX on my machine takes quite a bit of space

Then just uninstall the previous one, and select to not delete the user folders. Those wille be picked up by a newer version and migrated over...

 

Yeah I noticed that it picked up on GCC from Studio about an hour after I wrote that OP.  BUT, if MPLABX detects GCC in Studio and installs from that I should be good to go then correct

Jupp, as long as you keep Studio... cheeky

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

Last Edited: Sat. Feb 23, 2019 - 11:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Thanks, I bought 2 Snaps, so I will mod one of them with a 1k resistor, it will be dedicated for UPDI. It seems to be working fine, but I'm not convinced the transmission speed setting is actually doing anything... needs more testing.

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

Morten,

Always good to know that you are still stalking the AVRFreaks site!

 

So I hijacked this Thread on post #7, and now on Post #54 I am still no closer to having a definitive answer to my question / problem.

 

It still isn't clear to me if the Error I listed above is "Just" a Windows 10 / USB error, or if it also reflects the fact that the M328P and M328PB are "Yellow", and not yet supported, and that when they are supported the error will likely disappear and MPLab X IPE will then connect to the chip.  (i.e. At what level is this error actually generated, Win10  to MPLab, or when the SNAP attempts to connect to the chip and answer back to the MPLab program?).

 

Follow on question, do you have any idea how rapidly support for AVR chips is being added to MPLab X?

Do I have to be a mega-quantity orderer to get the chips above added, or are they already on someone's To Do list?

(My wish list would be: M328P, M328PB, and the Xmega E series.)

 

Finally, two comments in case you didn't read the full Thread:

 

I've not had a good Out-of-the-Box experience after purchasing several SNAP's.

I've spent, literally, several 4 hour time blocks on this and haven't yet flashed an LED.

That includes 3 MPLab X downloads on two separate Win 10 computers.

 

The MC Forum, also, hasn't been user friendly, but perhaps I'm spoiled by the AVRFreaks site.

It took 2 days to have my log on approved, as my Freaks logon didn't cross over.

And I think I'm on day 3 awaiting a MC Moderator to approve my first question / post on the MC Forum.

I guess none of the moderator's over there work weekends, again pointing out how fortunate we are on the AVRFreaks site.

 

The marketing promo's for the SNAP on the MC web site are clearly very mis-leading...

They clearly state that MPLab now supports AVR's...

It isn't until one delves deeper that one learns that the actual support is currently minimalistic at best.

 

I'm glad to hear that the AVR Flash, (Edit: Should be Atmel Ice, my mistake), programmer works with MPLab X.

But if I wanted to use my Flash programmer I wouldn't have purchased the SNAPs...

 

If I was a professional developer and I'd lost a week's time on this, as a newbee to MicroChip, I'd be looking elsewhere.

 

Sorry I'm not able to report success and a great experience, but I have to tell it as I see it from the end customer perspective.

 

Jay Carter

Last Edited: Sun. Feb 24, 2019 - 11:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But did you try to set the protocol to something other than AVR, then back to AVR? It worked for my tiny1616.

At first, I was getting the same error you mentioned in #23.

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

It looks as if El Tangas and ajc are the only "users" so far!    The SNAP has been on the market for 6 months !

 

I don't see a pullup as being a deal breaker for UPDI.    I could just add a jumper to my home made adapter.

 

Has anyone managed to run an IDE or IPE session with a SNAP with JTAG, PDI, ISP, TPI, ... yet?

Has anyone managed with PIC18, PIC24, PIC32, ... yet?

 

I am intrigued.    Perhaps I will buy a SNAP to see for myself.

 

@Jay,

Atmel tools were "unusable" for several periods in the life of AS6 and crap USB drivers.

At least AS7 seems to be operational.

 

David.

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

It still isn't clear to me if the Error I listed above is "Just" a Windows 10 / USB error,

It is a USB error... 

 

or if it also reflects the fact that the M328P and M328PB are "Yellow", and not yet supported,

Yellow means beta. For AVRs, that means that everything should work, but we haven't done in-house testing to verify that specific part yet. For instance we fixed a bug relating to devices that has a different ISP page size than its real page size between 5.10 and 5.15. Also one issue with PDI on XMEGAs with large page sizes hung the PK4 firmware in 5.10 which is fixed in 5.15.

Follow on question, do you have any idea how rapidly support for AVR chips is being added to MPLab X

Per now, every AVR in Studio is supported by MPLAB. There are some issues with HW, like the pull up needed for Snap for UPDI, and some TPI stuff on Snap, but for the most part all the Atmel tools (Atmel-ICE, EDBG, mEDBG, Power Debugger) are working.

 

I've not had a good Out-of-the-Box experience after purchasing several SNAP's.

I've spent, literally, several 4 hour time blocks on this and haven't yet flashed an LED.

That includes 3 MPLab X downloads on two separate Win 10 computers

I can't really explain that. The error is a USB error returned by the USB stack in MPLAB.

 

They clearly state that MPLab now supports AVR's...

It does...

 

 

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

Last Edited: Sun. Feb 24, 2019 - 08:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Same hassle everytime when update the firmware under Linux. Needs multiple runs of mplab_ipe to succeed. But when done, simple debugging with v5.15 and snap works. Target is a Tiny1614. But a 1k pullup to overwrite a 4k7 pulldown isnt very elegant. I built an adaptor with a current-source based on a BCV62 on it. When modifying my snap, i would replace the pulldown by a pullup.

Attachment(s): 

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

El Tangas

Yes, I saw that approach mentioned above and gave it a try, unfortunately without success.

 

David,

I actually bought three of them, in total.

I was looking for a simple Windows user interface, and programmer, to give to someone for a project I'm over-seeing.

(The AVR Flash connector is very fragile, and I hate to give away my ARV ISP mkII, it is my workhorse!  The SNAP seemed like a good solution.) 

I'd gladly drop one in the mail to you, but I expect the postage would be more than you picking one up locally.

 

Morton,

Thank you for the update.

Perhaps I'm being overly perturbed and cynical, if the MPLab X and SNAP actually work for AVR's for most people, and I'm an isolated problem case.

That said, I'm just reporting my experience, and looking for a working solution.

 

My primary system is a Dell desktop with an Intel i7, 920, 2.67 GHz, with 8 cores, running Windows 10 Home, (V1803 OS Build 17134.590).
Device Manager with the SNAP plugged in:

Microchip Tools

Microchip WinUSB Device

This device is working properly.

Driver:

Microchip Technology, Inc.

Driver Date: 3/20/2018

Driver Version: 1.0.0.8

Digital Signer: Microchip Technology, Inc.

Driver Management concluded the process to install driver mchpwinusbdevice.inf_amd64_875121ba87e95050 for Device Instance ID USB\VID_04D8&PID_9018\BUR183075981 with the following status: 0x0.

 

As I mentioned above, the MPLab X IPE fills the tool box with SNAP and the boards serial number.

So, again as questioned above, either the USB connection worked and MPLab queried the SNAP and (correctly) received a reply over the USB link, or MPLab simply read it from a Windows USB device table, and then failed to make the connection, in spite of Windows thinking it installed the driver without a problem. 

 

On a side note my AVR Flash, (Edit: Should be Atmel ICE, my mistake), and AVR ISP mkII both work fine under Studio7....

 

Morton, know that I certainly don't expect you to troubleshoot the above.

But I've provided it here in case others are reviewing the Thread, particularly if they experience a similar problem, or perhaps can report success with a different USB driver.

I've also provided it so that if you elected to do so you could pass a link to the Thread, or copy/paste the above, to whomever troubleshoots such issues.

It likely isn't all the info needed for problem identification, but is perhaps a start.

 

NetOger,

Sorry, I'm not running Linux, so no comments or experience in that regard.

 

JC

 

Last Edited: Sun. Feb 24, 2019 - 11:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, again as questioned above, either the USB connection worked and MPLab queried the SNAP and (correctly) received a reply over the USB link, or MPLab simply read it from a Windows USB device table
.
We do the latter... So your error comes the first time we actually connect...

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

DocJC wrote:
David, I actually bought three of them, in total. I was looking for a simple Windows user interface, and programmer, to give to someone for a project I'm over-seeing. (The AVR Flash connector is very fragile, and I hate to give away my ARV ISP mkII, it is my workhorse! The SNAP seemed like a good solution.) I'd gladly drop one in the mail to you, but I expect the postage would be more than you picking one up locally.

It is too late for me to order a SNAP from Farnell this evening and get it on Monday.

 

If the topic remains "interesting" I will order at 18.00 on Monday.    Receive it on Tuesday morning.

 

What is "AVR Flash"?   I presume you mean ATMEL-ICE

 

David.

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

My mistake, yes, I meant Atmel Ice.

 

JC

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

All of this sounds so complicated.  I thought my $20 AVRISP MKii from China, and my $50 ICE from Atmel would keep me happy with my Windows 7 machine and Atmel Studio 7 for the rest of my life.  Someone pointed out some of those may not last the rest of my life, and right away I dropped the AVRISP and it stopped working, so I ordered another one from China for $13.  In the meantime, my ICE is flawless.  I just like to use the AVRISP to save wear and tear on my ICE.

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

I bought these Snap things because they are cheap and can program and debug almost everything from microchip (PIC/AVR/ARM). Maybe too good to be true?

They have several glitches but are usable to me, so given the price I really have no complaints.

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

DocJC wrote:
(The AVR Flash connector is very fragile, ...
Tag-Connect has Atmel-ICE product that will pitch convert with strain relief on the end that gets worked a lot; otherwise, the pitch converters in several threads here.

DocJC wrote:
... and I hate to give away my ARV ISP mkII, it is my workhorse!
Ain't Atmel AVRISP mkII great?

Apparently twice the drive of an Atmel-ICE.

IIRC, the ones at Waveshare make the AVRISP2 clone.

Dean's LUFA AVRISP2 has several manufacturers.

STK500v2-compatibles are many.

If for a unified memory AVR (UPDI) then there's the few very low price alternatives to programming by Atmel-ICE.

 


http://www.tag-connect.com/search/node/Atmel-ICE

 

OSH Park ~ AtmelICE Adapter

50-100mil Adapter allows you to connect a mikroProg for STM32 programmer and hardware debugger to a Cortex debug connector

PinBoard 1.27mm to 2.54mm Cable Converter for Zigbee Bluetooth Emulator Download | eBay

Proto Advantage - Dual Row 1.27mm Pitch 10-Pin to Dual Row 2.54mm Pitch Adapter

Proto Advantage - Dual Row 1.27mm Pitch 10-Pin Male Header to DIP-10 Adapter

Atmel ICE header adapter

most of the above are due to posts here :

Atmel ICE custom cable part numbers for you. | AVR Freaks

https://www.avrfreaks.net/forum/ice-header-adapters#comment-1877541

https://www.avrfreaks.net/forum/atmelice-rats#comment-2026396

https://www.avrfreaks.net/forum/avr-dragon-vs-avr-ice#comment-2095001

https://www.avrfreaks.net/forum/does-mega1284p-xplained-board-work-atmel-icess#comment-2485006

https://www.avrfreaks.net/forum/atmel-ice-pin-out#comment-2523716

 

USB AVRISP XPII - Waveshare Wiki

WaveShare | eBay Stores - AVR - Programmers/Debuggers

 

Four Walled Cubicle - AVRISP-MKII Clone (function-like; Waveshare may have the compatible USB bridge that was what EOL'd Atmel AVRISP mkII)

 

Pololu USB AVR Programmer v2.1

 

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

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

MarkThomas wrote:
I thought my $20 AVRISP MKii from China, ...
I'm so glad (scary?) you have that mind connection with the ones of China. cheeky

MarkThomas wrote:
... and right away I dropped the AVRISP and it stopped working, ...
Sorry about that.

MarkThomas wrote:
... so I ordered another one from China for $13.
surprise (to continue that price flow, by UPDI would be very inexpensive)

 

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

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

MarkThomas wrote:
I just like to use the AVRISP to save wear and tear on my ICE.

 

What about anlank2's little programmers?  They work great!

 

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

 

I have several of them and they are certainly easy to use.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

westfw wrote:
(I'd recommend an Xplained Mini.)
arrived 21-Feb'19 :

MPLAB® X IDE - Debugging with debugWIRE for AVR® MCUs - Developer Help

 

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

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

Does the SNAP work with Atmel Studio, or only MPLab?  I am resistant to changing away from AS.

 

The ICE does seem to have a weak USB connector.  As other folks have done, I have my ICE mounted on a piece of foam core with the USB cable zip tied down to remove stresses on the USB connector.  I love the ICE, and it works perfectly for all the mega's I use.  It was only $50 when I bought it from Digi-Key.

 

I looked at Xplained Mini, and they come in various flavors of ATmega's, but not the ATmega1284P, which I use a bunch of.  Will any Xplained Mini work as a general purpose programmer/debugger for any mega?

 

jgmdesign wrote:
What about anlank2's little programmers?  They work great!

What is all the EEPROM for?

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

18.00 arrived.   I have ordered a SNAP from Farnell.   I will report back when it arrives.

 

You can make a programmer out of almost anything.    e.g. Uno, Nano, Pro Micro, ...

Or you can program different firmware into a USBASP.

 

It all comes down to something that is convenient and easy to use.    For example,   programming PICs with a HEX that is stored in the PICklit memory.

Alank's can program from stored HEX.

The AVR Butterfly could program from different HEXs stored on the DataFlash chip. 

 

The PICkit mates nicely with a 8x1 or 7x1 male header on a PIC target pcb.

AVR targets tend to use 3x2 or 5x2 which need a ribbon cable. 

 

What you end up using the most is the best programmer for you.

 

David.

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

david.prentice wrote:
What you end up using the most is the best programmer for you.

Too true, David.  I'm hooked on the AVRISP mkII and the ICE.  It would be easier to solder 8x1 or 7x1 headers than the 3x2's I use on my boards, but I am getting pretty good at it.

 

I'm wondering how long the new Chinese AVRISP will last.  All the vendors on AliExpress have a different version from what they used to look like.  There is a 10 to 6 adaptor that plugs into the 10 pin connector to use with the usual 3x2 programming header.  It says it works with AS7.  We will see.

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

Does it appear as an AVRISP-2 e.g. abcminiuser's firmware

Or does it appear a STK500 on a COM port?

 

The AVRISP-2 clone should support ISP, PDI, TPI, ...

The STK500 clone probably only supports ISP.

 

It really comes down to a pleasant looking case,   robust USB connectors,    robust 3x2 or 5x2 ribbon connectors.

But if you do break it,   you can create your own with Uno, ...

and buy a replacement for your favourite.

 

David.

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

david.prentice wrote:
Does it appear as an AVRISP-2 e.g. abcminiuser's firmware

When I plug it in a new menu item called Atmel appears in the device manager, and when I expand it it shows an AVRISP mkII.

 

To top things off, I opened the case and wiggled the ribbon connector and now it works fine.  So I guess I will have a spare when the new one comes from China.  Seeing as how i will have two, this one will probably last forever.  O well.  I like the things for programming, and I use the ICE for debugging.  The two Chinese versions I bought were together still cheaper than the original Atmel item I got from Digi-Key years ago.

 

It looks like only enterprise users with sufficiently deep pockets will be able to get the Windows 7 updates for another 3 years after next January.  Us little users will be forced to upgrade to Win 10, or go offline.  Since I use Dropbox for backup, I will need to get external storage for my Win7 machines where I do my software development if I go offline.

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

I ordered at 18.00 on Monday.  The SNAP arrived at my door at 11.00 on Tuesday.

 

I have wasted several hours.   I have not been able to get the SNAP to work at all.   The USB comms fails.

 

PICkit4 and ATMEL-ICE work just fine.    Whether JTAG, ISP, debugWIRE, ...

Surely the USB comms is exactly the same for PICkit4 or SNAP.   One works and the other fails.

Tried with Win10-64 Desktop PC and Win7-32 Laptop PC.

 

David.

Last Edited: Tue. Feb 26, 2019 - 09:59 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are getting the "Error code -10121" thing, too? I'm not sure why, but one of my Snaps started working eventually (the other one, I didn't power it up yet). At first, I thought it was because of me changing targets between AVR/PIC/ARM, but probably just a coincidence.

Last Edited: Tue. Feb 26, 2019 - 10:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:

Error code -10121

 

Does it help to know that -10121 in hex is 0xD877?

 

--Mike

 

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

Yes,  I got lots of "Error code -10121"

 

I tried changing targets and interface protocol with no effect.

 

I am sure that the solution is trivial.    After all,  the SNAP has been on the market for 6 months.

It behaves the same in MPLABX 5.10 too.

 

Likewise,   I am sure that when it is working in MPLABX support for SNAP could be added to AS7.

 

David.

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

Hi David,

 

Thank you for giving it a try.

It makes me fell better to know I'm not just doing something crazy stupid.

 

El Tangas,

Did you get it working under Windows, (or Linux, or Mac)?

By got it working, do you mean you have successfully downloaded a .Hex file to an AVR chip while connected to a Windows 10 PC?

 

I have my first post on the MC Forum, SNAP Sub-Forum, still awaiting a Moderator's approval to post it...

I submitted a  Support Ticket for getting my MC SNAP Sub-Forum Post approved yesterday, or the day before, I don't recall.

Needless to say that, also, has fallen on deaf ears.

Of course I am not a Fortune 500 company.

 

Not sure if Morton or any other Microchip employees are perusing this Thread or not, but I'll just mention again that one can only hope other users have / have had a better experience, mine has been depressingly dreadful... <sigh>.

 

SNAP doesn't work under Windows.

MC SNAP Forum, can't post as a new user, and can't seem to get my post authorized for posting.

MC Corporate Support, no reply there, either.

 

One week into this as a "new" MC user and still haven't flashed an LED, or made any measurable steps in the right direction.

 

On the up side, however, Morten dropped in so perhaps something good is happening behind the scenes.

And The AVR Freaks stepped in to provide assistance, (as is always appreciated!!).

 

Jay Carter

 

 

 

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

DocJC wrote:

El Tangas,

Did you get it working under Windows, (or Linux, or Mac)?

By got it working, do you mean you have successfully downloaded a .Hex file to an AVR chip while connected to a Windows 10 PC?

 

I'm using Win7 64. Yes, I flashed Hex files using both the IPE and the IDE. I was also able to use the debug feature.

I don't know why it started working, at first I was getting the same USB error. First, I tried all the USB cables I could find, then monitored the data lines on the programming header looking for any signs of life...

It started working while I was messing around with the IPE, testing all kinds of settings, etc.

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

Not sure if Morton or any other Microchip employees are perusing this Thread or not, but I'll just mention again that one can only hope other users have / have had a better experience, mine has been depressingly dreadful... <sigh>.

 

Anyone with issues should create a support case so that it can be routed to the correct people... 

 

Not sure if Morton or any other

If you keep calling me that I might just start actively ignoring instead cheeky

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

Ok, I powered up my Snap #2, and out-of-the-box, "Error code -10121". Snap #1 is still working.

 

I reproduced the way snap #1 started working:

 

1) select ATSAMC20E1A

2) press Apply

3) press Connect. Some firmware activity takes place. Some Win drivers are installed.

4) select ATtiny1616

5) press Apply

6) press Connect. Some firmware activity takes place. Some Win drivers are installed. This message should appear:

 

*****************************************************

...

Currently loaded versions:
Boot version...................1.0.0

Now Downloading new Firmware for target device: ATtiny1616
Updating firmware application...

From here on, the Snap is "cured". Worked on my 2 Snaps.

 

edit: forgot to say - this is using the IPE software.

Last Edited: Wed. Feb 27, 2019 - 12:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Woo-hoo.   I have just run MPLABX v5.10 and SNAP is working with JTAG and working with debugWIRE !!

 

Then tried v5.15 with the debugWIRE project.   And that is working now.

However v5.15 with the JTAG project gives:

The VDD voltage desired is out of range. It is below the minimum voltage of 1.5V.
Connection Failed.

 

I wish that I knew what was happening.   My bedtime.

 

David.

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

Well, I ordered a SNAP to try out.  I guess it should be here in a day or two.

I has essentially assumed that the SNAP was a PICKit4 with no fancy package and "limited" software, but my PICKit4 seems to work fine...

(at least I'll have a "known good" adapter/target setup to try out!)

 

 

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

Well, I'm making progress.

 

I followed El Tangas's procedure from Post #81 and MPLab X IPE v5.15 WILL now communicate with a Nano, (Using the Win 10 interface).

 

It isn't quite all correct, yet.

 

I have to Disconnect and then Re-Connect to the chip between Programming episodes.

 

MPLab sets my Nano (M328P) in Internal RC Osc at 8 MHz with with Div by 8 Fuse set, (active), so my micro runs at 1 MHz.

 

I have been through the Advanced Settings and I can SEE the "Configuration Bits", (Fuses), but I can't change them.

A pop-up says:  Editing the configuration bit setting is disabled for AVR devices"

 

WHAT?

 

MPLab RESET the Fuses, (the Clock in particular), and I don't yet see that it will let me reset it back to use the external 16 MHz Xtal!!!

 

Perhaps I just need more time with the interface, but I've played with it for an hour now.

 

I disconnected the SNAP, loaded Studio 7, and used my AVR ISP mkII to reset my Nano's clock back to the 16 MHz External Xtal.

That all worked fine, and the LED flashes @ 1 Hz like it is suppose to.

 

Now disconnect the mkII and close out of Studio 7.

 

Connect the SNAP, and re-Program the same LED Flasher .Hex file and it AGAIN RESETS THE CLOCK TO 1 MHz.

 

<><><><><><><><>

 

So, the SNAP is partially working, with El Tangas's work-around MPLab X IPE v5.15 will now talk to the AVR.

 

I'm still looking around to figurate out why it wants to reset the Fuses, and how to either disable that, or better yet tell it what I want the Fuses to be.

 

Thus far, it still isn't a working programmer for me.

I can't have MPLab defining my Clock and other Fuse settings!

 

The above testing was in ISP Mode.

I'll have to switch boards to test DW Mode, and truth be known I don't have much experience with that mode.

But perhaps it will let me set the Fuses myself???

 

El Tangas,

Nice Job on tracking down a procedure to get the MPLab X IPE to communicate with the SNAP.

 

JC 

 

Edit:

Morten, 

Sorry, I apologize.

I used to work with a Morton, and I just typed it without giving it a second thought.

 

Last Edited: Wed. Feb 27, 2019 - 03:41 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hmmm I wonder if the next 2 cheap debuggers and programmers will be Crackle and Pop, already have Snap.....

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I have been through the Advanced Settings and I can SEE the "Configuration Bits", (Fuses), but I can't change them.

Historically, PICs set the config bits from inside the binary, using appropriate compiler/assembler directives.

You could try that with the AVR features that were added (relatively recently?)  https://www.microchip.com/webdoc/AVRLibcReferenceManual/group__avr__fuse.html

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

The IPE tool pops up this warning when you try to edit fuses:

 

Editing the Configuration Bit settings is disabled for AVR devices.

 

So it's disabled on purpose! 

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

MPLAB X v5.15, file 'Readme for MPLAB IPE.htm' 

Release Notes for MPLAB® IPE
Integrated Programming Environment

MPLAB® X IDE v5.15

 

February 20, 2019

...

(bottom)

7.14 Programming Configuration Bits of AVR and SAM Devices in MPLAB IPE

To program the configuration bits of AVR and SAM devices in MPLAB IPE, they need to be part of the hex file only. This differs from the MPLAB X IDE, where they can be programmed separately via the configuration bits memory window.

For PIC devices, however, the configuration bits can be programmed separately using MPLAB X IDE and MPLAB IPE.

 

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

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

It's here!

Mine doesn't work either:

Data transmission failed. Error code -150 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.

This is on a Mac, using MPLAB IDE or IPE, with an ATmega328p as target, using the same setup that works fine with a PICkit4.

Sigh.

 

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

To program the configuration bits of AVR and SAM devices in MPLAB IPE, they need to be part of the hex file only. This differs from the MPLAB X IDE, where they can be programmed separately via the configuration bits memory window.

Gchapman, thank you for that post. 

I have no idea why MC thinks the SNAP is suitable for programming AVR's with its IPE.

Even with the workaround above to get it to connect USB-wise, it automatically sets the clock to 1 MHz...

 

Well, I'm still terribly disappointed.

 

The SNAP is useless when it automatically sets my board's clock to 1 MHz when using the IPE interface.

The IPE seemed to be a lot easier to navigate than the IDE, but I'll grant you I've not used the MPLab IDE before. 

 

So I spent a little while working with the MPLab IDE, and giving it a pre-generated .Hex file from another compiler, (which is my intended purpose to begin with), and I could not make it let me adjust the Fuse bits.

I kept getting some messages about ISP and DW modes, and I had great difficulty trying to get into ISP mode, which the MPLab pop up told me was necessary in order to change the Fuse bits.

 

The best solution, in my mind, would be for MC to:

1) Fix the Windows 10 to SNAP USB connectivity problem.

2) Add another option in the Advanced Mode to let the user adjust the Configuration Registers, (Fuse Bits), from within the MPLab X IPE.

 

Until then I have three paperweights sitting on my desk.

 

JC

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

Just ordered one of these as my Atmel ICE has died.

 

We'll see what happens

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

Last Edited: Thu. Feb 28, 2019 - 04:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tom,

 

The SNAP seems to work ok for debugWIRE and ISP (on popular AVR models)

It supports some UPDI models.   UPDI requires a hardware mod.  I have not tried UPDI because I have onboard debuggers.

 

It currently does not do JTAG on v5.15 (but ok on v5.10)

It does not do PDI on Xmegas

It does not do TPI on Tiny20/40/5/10

It does not support the PIC18F458 (that I have).    But it does do some PIC18F.

 

It looks as if the Sales and Marketing was done by Donald Trump.

 

Having said that,   I would guess that the hardware is present for JTAG, PDI, TPI, ...

We just need to wait for Microchip to release the appropriate software (and possibly firmware upgrade to SNAP)

 

Think about it.    In the Atmel era announcements would be made.   No hardware appeared for months if not years.

The SNAP appeared in real life.    Microchip have not done the software yet.

 

David.

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

david.prentice wrote:
It looks as if the Sales and Marketing was done by Donald Trump.

 

Related image

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

Snowflakes, the sky is falling..............................

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

Today in the Microchip forum MPLAB Snap Digisoles reported a solution response in two of his posts.

 

Snap. Failed to get Device ID  https://www.microchip.com/forums/m1081464.aspx

Snap error  https://www.microchip.com/forums/m1089112.aspx

 

Hi,
found the problem, so I'm adding the solution here for those that have the same error and search through this forum:
It was not a connection issue, you must use a USB hub, and all you nightmares will be gone. Smile: Smile

 

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

Interesting, but I don't think that is the real solution to the (multiple) problems.

 

This SNAP should still be able to connect directly to the USB Host chip on the PC mother board, without a hub.

 

The additional killer bug is that the SNAP resets the AVR's clock to  the internal RC clock and enables the Div by 8, so the micro runs a 1 MHz.

If I have to  run Studio and an AVR ISP mkII or Flash programmer to re-set the Fuses for the clock every time I use the SNAP then it defeats the purpose of suing the SNAP, at least for an AVR.

 

That issue, obviously, isn't related to the USB Host to SNAP connectivity issue.

 

JC

 

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

defeats the purpose of suing the SNAP

Yep, just do it....

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Hello mraardvark,

 

I appreciate the update, and it is certainly a step in the right direction.

 

Unfortunately, the SNAP still resets the AVR's Fuses to use the internal RC Osc with Div 8 active.

That makes it worthless, as I have an external Xtal on the board for a reason!

 

JC

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

Are you sure about that? It would be MPLAB that would do that, and by default MPLAB will not wrote fuses at all (unlike how it does for PICs).
.
Do you have fuses in code? Or have you used the configuration bits window? Do you have the message in the output window saying that configuration bits will not be written when you program?
.
What version of MPLAB?

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

Last Edited: Mon. Apr 8, 2019 - 12:53 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

At work today, will try to get you some details and screen shots tomorrow.

Yes, I am sure it is resetting the Fuses and the clock, it is extremely frustrating.

I had to fire up Studio and my AVR ISP mkII and reset the Fuses each time I used the SNAP.

 

I was just trying to burn a program file, .hex.

No elf, no bootloader, no fuses, no eeprom.

 

Thank you for the interest.

 

JC

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

Are you using the IPE by any chance? The IPE will reset fuses unless you have them in the hex file..

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

April 11, 2019                                                  File: SNAP Test Notes

Micro Chip SNAP Programmer testing with AVR Mega328P:

Testbed: 

Arduino Nano with a M328P, 5V,  16 MHz Ext Xtal.

A few LEDs and PB Switches attached.

 

Step #1:

Use Studio to program Nano to flash an LED at 1 Hz, using 16 MHz external Xtal.

Studio:  Atmel Studio 7.0.1645  (Programmer: AVR ISP mkII)

File:  Nano Breadboard LED Test V1.bas    ---> .hex

Fuses:

Ext: 0xFF, High: 0xD9, Low: 0xD6

Ext. Full Swing Crystal, Div by 8 disabled.

Micro runs as expected, at 16 MHz, flashes an LED at 1 Hz via ISR.

Close out  Studio.

 

Step #2:

Use MPLab X IDE to load the same pre-compiled .hex file into the same Nano.

MPLab X IDE Version: 5.15

Open Project fails, (Presumably because it isn't a C program)

So instead use: Import Hex/Elf (Prebuilt) File, which is what I'm trying to do anyways.

Select the SNAP programmer from the HW Tool box.

In the top left box, select the hex file.

The hex file shows up in the top right box, (Source).

The Lower right box has 3 tabs: Output, Program Memory, Configuration Bits.

The Config bits are all RED, and the clock says Int RC Osc 8 MHz..., and the Div8 is SET.

Press the little "Read Configuration Bits" button, the top one of the stack, to PRESUMABLY read / upload the current Fuse settings.

Nothing happens.

The Config bits box remains all red, and it doesn't upload the micro's current Fuse settings.

The lower box settings are: Memory: Configuration Bit, Format: Read Only.

 

 

Oh well, I just want to burn a .hex file, (without any embedded Fuse data).

It appears that the only "Burn a hex file" option I can see is the button on the upper bar that says:

"Make and Program Device Main Project", with the green download to device arrow.

 

Note: I don't want to "MAKE" the project, I JUST want to download a pre-compiled .Hex file!!!

And I can't seem to be able to upload my current Config Bits (Fuses)...

And in the Conf Bits view, lower right box, "Read Only" is the only pull-down option available.

I can't seem to edit / change the Fuse settings.

OH well, try the burn, perhaps it will just write the .hex file, and not mess with the Fuses:

Error Failed to launch debug session using debugWire.

 Note: I DON'T want to debug, I JUST want to burn a .hex file!!!

Screenshot taken.

 

So, two options here, first try:

Say no, I don't want to use ISP to enable debugWire.  --> Get: Programming did not complete.

Now do the same, but say Yes, use ISP to enable debugWire:

Get "Please toggle power on the target device", OK, done.

Get the same Failed to launch debug session using debugWire: message.

 

So, perhaps the issue is the Arduino Nano's Reset\ line hardware?

Unfortunately the same sequence occurs with a custom PCB with a M328PB chip and only a 10K pull-up on the Reset\ line.

So it doesn't seem that the Arduino Nano HW Reset\ line is likely an issue.

The original program and Fuse settings were untouched by the above process.

 

The programming box says:  Change communications interface to ISP in the project properties to read or write configuration bits.

Snapshot taken. Project Properties box.

 

Since the Project Properties box doesn't have a "Communications" pull-down, go look in the Manage Config sub-box.  Nope.

So try clicking on the SNAP in the Project Properties Categories box:

Then in Options Category select Communications.

See that debugWire is the currently selected version, so change it to ISP via the pull-down.

BUT: The "OK" button is grayed out. 

So HOW does one make the Comm mode ISP???

Screenshot: Comm ISP Mode

 

 

 

OK, try again:

File / Project Properties / Now in the Categories Box try "Loading"

Good, there is an option to "Load this .hex file instead of or dist/default/....

So, select my pre-compiled Nano Breadboard LED Test V1.hex file.

Click "Add loadable file"

Screenshot: Load this hex file instead.

 

 

 

Again: there are grayed out "OK" and "Apply" buttons, so HOW does one make one's selection take effect?

Very frustrating.

Apparently using MPLab X IDE V5.15 and the SNAP programmer to simply burn a pre-compiled hex file is a non-trivial process.

It would appear that I can almost get there..., but not quite.

.........................................................................................................

So, let's switch gears and try to simply burn a pre-compiled hex file using MPLab X IPE, (instead of the IDE, used above).

MPLAB X IPE V5.15

Close out the IDE and run the IPE.

It sees the SNAP programmer and shows this in the Tools box.

Select the hex file, and get a message that the file was loaded successfully, (into the IPE, not yet into the micro).</