cancel
Showing results for 
Search instead for 
Did you mean: 

Levelx without Filex

Harwinder2312
Associate II

Hi Everyone,

I one of our project i want to store the logs on NOR flash. I want to use Levelx to take care of NOR flash low level . But as per documents levelx can be used with Filesx, Is there is any way that i can use Levelx with Filex?

9 REPLIES 9
Andrew Neil
Super User

 


@Harwinder2312 wrote:

Is there is any way that i can use Levelx with Filex?


You mean without ?

  • ST say, "LevelX must be used alongside with FileX" here;   
  • Eclipse say, "Applications may use LevelX in conjunction with FileX or may read/write logical sectors directly" here.
  • also, "LevelX has no dependency on FileX" here.

 

So it looks like you'll have to work direct from the Eclipse documentation to do that ...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Harwinder2312
Associate II

Yes on St wiki it says it must use with filex, that's why i asked. Thank you for other references. I will try and update you one this. Thanks


@Harwinder2312 wrote:

Yes on St wiki it says it must use with filex


Probably what they mean is, that's the only way ST provide support via CubeMX - if you want it standalone, then you have to do that manually, on your own.

Like this.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Harwinder2312
Associate II

Yes you are right, this point is also in my mind, I will try both ways and update you which one works for me. Thanks

Haithem Rahmani
ST Employee

Hi @Harwinder2312,

Could you please provide more details on how you plan to use LevelX alone?

Please keep in mind that LevelX doesn't have any filesystem logic.

regards
Haithem.

Hi  Haithem,

Let me explain bit details. I am working on an HVAC system where i need to store all logs of HVAC system with time stamp. Earlier i was using EEprom, as you know in eeprom has size problem. This time i want to use OSPi Flash, as i am working with STM32H573 MCU. I have seen the DK board for same series and using same OSPi with 512Mb size.  We have provision of USB drive to download logs. For USb drive i am using filex to MSC class to save CSV file in USB drive. On flash side i want to use Levelx only to protect sectors,. as its mentioned in documents of Levelx that it take care of flash with rotation of sectors also power failure snario . So that is the main purpose of using levelx. If you have some better idea please suggest i am happy to listen you view point on this. Any advice will be helpful. I you need  more information i am happy to share as well.

Thanks

So, if you already have FileX, why not use it for storing your logs?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

There are two reasons, one is this is my first time i am using filex so i don't know much how to use it for two instances(one for Flash and other for USB). Second may be i am wrong i don't want to overload flash by file system. 

Haithem Rahmani
ST Employee

Hi   

thanks indeed for this fruitful discussion, really appreciate it.

- Here is the link to an application on STM32H573-DK running 2 FileX instances. (uSD + OSPI).


 @Harwinder2312 wrote:

On flash side i want to use Levelx only to protect sectors,. as its mentioned in documents of Levelx that it take care of flash with rotation of sectors also power failure snario

 



@Harwinder2312  wrote:

There are two reasons, one is this is my first time i am using filex so i don't know much how to use it for two instances(one for Flash and other for USB). Second may be i am wrong i don't want to overload flash by file system. 


If I understand correctly, you want to use LevelX to write log data into LevelX logical sectors to benefit from LevelX wear leveling without the overhead of a file system. If that is the case, I'm afraid this won't work, as doing so will make access to the log data quite difficult since the logs will be spread throughout the entire OCTOSPI. The mapping between LevelX logical sectors and physical addresses is managed internally by LevelX.

Thus you'll need a filesystem on the NOR Flash too to keep your logs structured accessible easily by the application.

Hope this helps

Haithem.