Bug in SAM-BA 2.16

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

There is a bug in the SAM-BA 2.16 bootloader for the SAMD21 supplied as an Atmel Studio 7.0 example project that causes stack overflow.

 

In the SAM0 SAM-BA Bootloader Example for SAMD21 Xplained Pro:

 

File: sam_ba_monitor.c

Line: 160: sp = __get_MSP(); should not be in function call_applet.

 

Move it before line 265 (the "Go" command that calls call_applet):

sp = __get_MSP();
call_applet(current_number);

 

Otherwise the stack overflows and overwrites user variables.

 

In my case it showed up trying to transfer a ~8k (0x2000) byte file.

 

JP

Last Edited: Sun. Mar 12, 2017 - 07:45 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bug confirmed by Microchip support 2017-03-21.

JP