ATSAMC21 CAN Bootloader?

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

I want to be able to re-flash an ATSAMC21 over the CAN bus.  From the data sheet:

 

The Flash program memory can be reprogrammed in-system through the SWD interface. The
same interface can be used for non-intrusive on-chip debug of application code. A boot loader
running in the device can use any communication interface to download and upgrade the
application program in the Flash memory.

 

I am experienced with CAN but not bootloaders and can't find any application notes.  Can anyone give me a place to start?

 

 

 

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

Did you find out anything on this question?  I'm evaluating what my options are for a CAN-based bootloader on this same device.  Did you learn anything, or find a general approach for accomplishing this?

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

Unfortunately I haven't had any luck getting help from Atmel on this.

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

It appears that I would have to roll my own bootloader for this.

 

SAM-BA uses UART and/or USB.  It is open source and so I could modify it to CAN, but it would be a fair amount of work.  And then it appears that SAM-BA is really only a monitor that allows the PC side to load and execute applets on the target, and so I'd have to modify the PC and applets too, if they are open source, although in my application there is no use for the PC side - the software update would be triggered by a machine controller on the network and never by a PC.  So the controller would need to implement the PC side of SAM-BA.

 

After this amount of effort, I think developing my own bootloader is the way to go.  My company has already rolled one for a ST ARM, and so I can adapt that state machine to the SAMC21 and it means minimal code impact on the machine controller side (same transfer system, just have to add a new target profile).