Loading or point to the page buffer for NVM page writes SAMD51

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

 

I am working on a custom bootloader for the SAMD51,  and I can't seem how to figure out how to load, or point to data that is loaded into the Page Buffer for a Page Write.

 

I looked at the UF2 bootloader code, but that appears to write NVM with quad-words.  I need to do page writes.  Anyone know?

 

I see that other people have figured this out in the forum, but they never posted to solution.

 

Thanks,

-troy

This topic has a solution.
Last Edited: Sun. Dec 1, 2019 - 09:13 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not 100% sure what you are asking about but maybe make a start project at start.atmel.com, add the flash driver, export and look at the _flash_program function (it writes one page).

/Lars

 

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

Lars, thanks so much for this reminder.  For some reason, I thought the Flash driver in START was for an external flash.  I think this driver will be just what I need.

 

 

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

Note that the D51 has caching and there are some erratas.  Enclosed is a flash driver I wrote for the D51. 

 

Also note that a lot of the Atmel/Microchip drivers assume the data cache on processors are turned off.  For example on the D51 I would write to flash and then read it back to make sure it was written correctly, however the data cache had previous flash data it would fail the test. 

 

 

Trampas

Attachment(s):