SAM4S Bootloader

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

I am using a SAM4SD32. I would like to enable the end user to update flash using the ROM bootloader. For various hardware reasons re-booting into the bootloader is not possible. Therefore, I want the application code to jump into the bootloader ROM. I have searched the Atmel documents and the forums, but I have not found the ROM entry point.

It occurs to me that what I want to do is not possible, because flash must be erased before writing to it. Can anyone shed light on this?

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

"The SAM4S embeds an internal ROM, which contains the SAM boot assistant (SAM-BA®), In-Application Programming (IAP) routines and Fast Flash Programming Interface (FFPI).  At any time, the ROM is mapped at address

0x0080 0000"  --page 39 of the datasheet.

I haven't used this specific part but it seems like if you jump to that address it should get you back into the bootloader.  Another possibility would be to host a bootloader in the flash and just disable booting from the rom all together. 

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

Yes I know that the ROM starts at x80 0000. But that appears to be the vector table mot the Boot entry point. And I could write a bootloader and put it in a locked region of flash. I wanted to not re-invent the wheel.

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

CRB603 wrote:
I have searched the Atmel documents and the forums, but I have not found the ROM entry point.

 

Have you seen this application note? http://ww1.microchip.com/downloads/en/AppNotes/Atmel-42141-SAM-AT02333-Safe-and-Secure-Bootloader-Implementation-for-SAM3-4_Application-Note.pdf

"When all else fails, read the directions"

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

Thanks PhillyNJ, I had not scene this app note. I think it has what I need.

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

CRB603 wrote:
Thanks PhillyNJ, I had not scene this app note. I think it has what I need.

 

Happy to help. Let me know if you get it working. Its on my todo list to do a bootloaded for the SAM4S.

"When all else fails, read the directions"