SAM-BA cannot connect to SAM D21

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

I'm trying to follow a tutorial to use the SAMD21 Boot Assistance bootloader, but fail to connect to my device, a SAM D21 Xplained Pro evaluation board. This is the tutorial:

 

https://microchipdeveloper.com/atstart:sam-d21-bootloader

 

I downloaded files here:

 

https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/SAM-BA%20In-system%20Programmer#additional-summary

 

  • SAM-BA 2.18 for Windows
  • SAM-BA MONITOR ROMLESS v2.18

 

I modified the bootloader application accordingly, and edited the DEFAULT_APP_START_ADDRESS to 0x6000. (By default both USB and UART are selected as possible interfaces to connect.) I flashed the program using Atmel Studio 7.0 as usual.

 

Then using the SAM-BA GUI application, I select the samd21_xplained_pro[not factory programmed] model, the correct COM port (there is only one) and hit "Connect". It either loads forever (waited half an hour) or it shows me the following error directly:

Invalid chip ID

Can't connect samd21_xplained_pro[not factory programmed]

[OK]

 

I'm not sure what causes it to load forever and what causes the "Invalid chip ID" message though, it seems quite random.

 

I've tried many things and looked for this error in the internet. I tried playing around with the NVMCTRL_BOOTPROT fuse. It was on 0x7 (0 bytes, so no bootloader) at first, but I tried all the other options.

 

I tried both the USB and UART method to connect (Target USB and Debug USB ports). No luck on both.

 

What can I try now?

Attachment(s): 

This topic has a solution.

Maybe someday I'll have a nice quote here.

Last Edited: Sun. May 10, 2020 - 01:43 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK guys, I fixed it. I read this application note (TB3190) and saw that there was another way to get the SAM-BA bootloader example. See attached screenshot.

 

I loaded the project from example projects in the Atmel Studio IDE. Apparently the example project was SAM-BA bootloader version 2.16.

 

When I flashed this one on my board and used the SAM-BA GUI program version 2.18, it worked. I can now get the complete tutorial working.

 

Why it didn't work with the SAM-BA_MONITOR_ROMLESS project (which is version 2.18) is unknown to me...

Attachment(s): 

Maybe someday I'll have a nice quote here.

Last Edited: Sun. May 10, 2020 - 01:46 PM