Security personalizer rewritten (#794)

* Removed ability to lock data section
* Introduced "guided mode" to simplify process
* Refactored the sketch to be less monolithic
* Print details and instructions in tables
* Use device unique ID as serial when
* Calculate and store personalization checksum
* Print serial in a copy+paste friendly manner (fixes #804)
* Clarify meaning of UART confirmation (fixes #805)
This commit is contained in:
Patrick Fallberg
2017-04-02 15:37:21 +02:00
committed by GitHub
parent 3350d79fe6
commit 7e6db413c7
14 changed files with 1794 additions and 954 deletions
+1 -2
View File
@@ -290,11 +290,10 @@ void SPIFlash::writeBytes(uint32_t addr, const void* buf, uint16_t len)
command(SPIFLASH_WRITEDISABLE); //end AAI programming
unselect();
#else
uint16_t n;
uint16_t maxBytes = 256-(addr%256); // force the first set of bytes to stay within the first page
uint16_t offset = 0;
while (len>0) {
n = (len<=maxBytes) ? len : maxBytes;
uint16_t n = (len<=maxBytes) ? len : maxBytes;
command(SPIFLASH_BYTEPAGEPROGRAM, true); // Byte/Page Program
SPI.transfer(addr >> 16);
SPI.transfer(addr >> 8);