Open abcminiuser opened 8 years ago
Block read/write APIs added, and partially wired into the NVMCTRL flash controller for reads only (see 9ee7207298f001a132fea2bb922d55c698540941). Writes still need work to use block writes, chunked to the appropriate flash page boundaries.
The block write function is byte-wise in the SAM-BA bootloader, which hardfaults when writing into the NVM address space. Looks like it's inevitable; I need to make a shim applet that receives the data chunk then copies it word-wise into the required destination.
The SAM-BA protocol supports block transfers to reduce the protocol overhead which is important for serial connected devices running at 115200 baud. This should be implemented and used in the flash controllers for bulk flash read and write operations.
Note that serial connected devices use XModem protocol encoding for blocks.