efabless / caravel_board

32 stars 41 forks source link

Fixed writing unaligned sections that may overlap page boundaries of SPI-flash (GF180) #89

Open shaos opened 1 year ago

shaos commented 1 year ago

Re-created PR for updated repo

One example that was written incorrectly by old version of utility:

...
@000009B0
00 00 00 00 01 00 00 00 00 00 00 00 02 00 00 00 
03 00 00 00 02 00 00 00 00 00 00 00 01 00 00 00 
00 00 00 00 02 00 00 00 03 00 00 00 02 00 00 00 
00 00 00 00 04 00 00 00 00 00 00 00 02 00 00 00 
06 00 00 00 02 00 00 00 00 00 00 00 04 00 00 00 
00 00 00 00 02 00 00 00 06 00 00 00 02 00 00 00 
12 00 00 00 02 00 00 00 00 00 00 00 08 00 00 00 
00 00 00 00 60 00 00 00 20 00 00 00 60 00 00 00 
40 00 00 00 60 00 00 00 62 00 00 00 E2 00 00 00 
62 00 00 00 60 00 00 00 62 00 00 00 E2 00 00 00 
E0 00 00 00 60 00 00 00 61 00 00 00 60 00 00 00 
61 00 00 00 60 00 00 00 FF FF FF FF 00 00 00 00 

Previously utility tried to write 256 bytes overlapping to next page 0xA00 and that extensive part was not written properly, corrupting beginning of the current page.

Now fixed utility is doing

shaos commented 1 year ago

Updated my branch one more time to match current state of efabless/caravel_board

shaos commented 1 year ago

Updated my branch one more time to match current state of efabless/caravel_board