Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about using FileX & LevelX with NAND on reset of microcontroller #3

Open
vmantri959 opened this issue Nov 2, 2023 · 1 comment

Comments

@vmantri959
Copy link

I was wondering if FileX is useful for a use case where the microcontroller resets, however, it has been writing data to non-volatile memory (in this case NAND).

When I call the function fx_media_format() for example, am I expected to clear all blocks of the NAND? I would assume not, since that would not help our use case.

However, even without erasing the NAND, if I call fx_media_format(), and try to open a file that was written prior to the reset, using fx_media_open() followed by fx_file_open(), I get an error. I can only open that file when I have written to it in the current iteration.

Thanks

@vmantri959 vmantri959 changed the title Question about using FileX & LevelX with NAND on reset of microcontroller` Question about using FileX & LevelX with NAND on reset of microcontroller Nov 2, 2023
@eclipsewebmaster eclipsewebmaster transferred this issue from another repository Jan 9, 2024
@nflandin
Copy link

nflandin commented Aug 29, 2024

I realize that this comment is likely far too late to do the original poster any good, but for the sake of others who may encounter a similar issue...

I encountered similar issues, and in my case the problem was a bug in my LevelX driver. LevelX creates a block map near the base of the (flash) memory, along with a cached version of the map in the work buffer. As a result, if there are any issues writing or modifying the (flash instance of the) map, everything will work fine until you close the media, but it will cause you problems whenever you try to open the media again. You can verify that this is the cause by closing and re-opening the filesystem (assuming that this does dump and reload the LX buffers, which it should).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants