MPLAB Snap with ATSAM processors?

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

I recently bought a MPLAB Snap in circuit debugger to test if it could be used with my SAMD20G16B.

I connected the pins:

  1. MCLR to the Reset pin of the SAM
  2. Vdd to the 3.3V rail
  3. 0V to 0V
  4. Data to Data
  5. Clock to Clock

 

According to the https://www.microchip.com/wwwpro... page, this processor is compatible with the debugger. I need to find out if it can be used as I intended or I should give it to my microchip friend so he has a new toy :)

I used Atmel Studio 7 and it only had SAMD21 chips to select from

Last Edited: Fri. Oct 11, 2019 - 08:11 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is a switch in the options in Studio to "hide unsupported devices" - if you clear this checkbox you can select any device and see if it works.

I think you will need the latest (September-2019 release) Studio for it to work.

Also, Studio cannot update the firmware of the Snap, so you might need to connect it to MPLAB first to get the latest...

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

I was in contact with one of the Microchip Field Application Engineers and after trying to program the device using MPLAB X IPE v5.25 several times. He got me to import the project from Atmel Studio into MPLAB X IDE v5.25 then compile and flash.

It compiled and programmed the micro correctly.

I still have an error for debugging:

The configuration memory will not be included in the program operation because the, "Exclude configuration memory from programming" option is set. To change this, go to the Memories to Program property page and uncheck the setting.
WARNING; Programming configuration values on this device can cause unintended consequences if all of the configuration values are not properly set. It is advised that you read the configuration values off of device first and then change only the fields you are concerned with.

but this is a problem for another day

 

I could not find the switch in AtmelStudio for showing incompatible devices but thank you for your reply

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

The "configuration memory" is referring to FUSES in AVR and SAM devices.

One of the big differences between PIC and AVR/SAM is that in PIC the configuration memory/FUSES are cleared on erase, so you always have to program it. It is usually made a part of the hex file. If you don't specify it MPLAB will program the default values for you.

In AVR/SAM the FUSES are never cleared by any kind of erase. They are only changed when you deliberately write them. In old AVRs it is actually possible to brick the device it you write the wrong setting. With newer AVRs and SAMs it is no longer possible to completely brick the device, but the retrieval can be quite costly depending on how available certain pins on the package are. You should still only program FUSES when you need to, and to be safe we always recommend to do a read-modify-write.

Since the AVR/SAM wasy is so different to what MPLAB users are used to this warning is displayed.

 

To show incompatible devices in Studio you go to Tools -> Options -> Tools -> "Hide unsupported devices". Set it to "False".

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

Thank you for your help.