niffs icon indicating copy to clipboard operation
niffs copied to clipboard

Writes to the same address without an erase

Open clivebluston opened this issue 7 years ago • 6 comments

I made some experiment with the code and found that there are writes to the same address without an erase in between. This would cause the NOR flash drivers that I work with to return an error. WRIT 0x638866 : 122 WRIT 0x638862 : 2 WRIT 0x638756 : 2 WRIT 0x638866 : 4 WRIT 0x638356 : 2 WRIT 0x6387e4 : 2 WRIT 0x638862 : 2

I also see that there has been no activity for a while. So I was wondering what is the status of the code? Thanks

clivebluston avatar May 17 '17 11:05 clivebluston

Niffs does write data to already written addresses for status updates (e.g. deleted pages). If it is possible, you'd need to rewrite your NOR flash driver. If that is not an option, I believe niffs can be patched to accommodate no writes on previously written bytes, but it would need some effort.

As for the , I haven't done anything with the code for some year(s), but it still serves the purpose I wrote it in the first hand - and is still running in that project. I simply haven't had any reason to change things. :) That said, if you find a bug please report it.

pellepl avatar May 17 '17 11:05 pellepl

I also noticed there is no license. This would be an issue contributing to the decision to use it. Is it an oversight?

clivebluston avatar May 17 '17 11:05 clivebluston

Yes, pure oversight. As a matter of fact I promised to add one months ago. Hold on.

2017-05-17 13:45 GMT+02:00 Clive Bluston [email protected]:

I also noticed there is no license. This would be an issue contributing to the decision to use it. Is it an oversight?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pellepl/niffs/issues/6#issuecomment-302065518, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3NVxC-g1UjLcTDKsUtuqY3-CaNrgsRks5r6t3JgaJpZM4Nduff .

pellepl avatar May 17 '17 11:05 pellepl

... and there it is.

pellepl avatar May 17 '17 11:05 pellepl

Thanks, that is great! I know that theretically you should be able to flip 1's that havent yet been flipped, however I played around with the driver by removing the code protecting a subsequent write without an erase, but the hardware operation failed. So I think it is something that I may have to live with. I will take a look at your code to try and understand how it can be patched. Thanks for your help.

clivebluston avatar May 17 '17 11:05 clivebluston

There are a number of micro-controllers that don't allow you to write the flash multiple times without erasing.

RallyTronics avatar Sep 28 '17 15:09 RallyTronics