Skip to main content
Visitor II
July 1, 2025
Question

Help with FileX/LevelX Implementation on STM32U585AII6Q with NOR Flash (IS25LP064D)

  • July 1, 2025
  • 2 replies
  • 306 views

Hello Microsoft Community,

I’m currently working on implementing a file system using FileX and LevelX on external NOR Flash (IS25LP064D) connected to the STM32U585AII6Q board.

Flash Memory Specifications:

    • Sector Size: 4 KB
    • Block Size: 32 KB / 64 KB
    • Total Flash Size: 64 Mbit / 8 MB
    • Page Size: 256 bytes

Requirement:

I need to create a .txt log file using FileX and once the file reaches 100 KB, it should be deleted and a new file created in its place.

Media Initialization Parameters Used:

    • Total clusters: 300
    • Bytes per sector: 512
    • Sectors per cluster: 8
    • Hidden sectors: 0
    • Heads and sectors per track: 1
    • Number of FATs: 1

Issue:

When writing logs using FileX, I receive a FX_IO_ERROR after a few logs are written—even though there is still available space on the flash.

My Questions:

  1.   What are the correct parameters to pass to fx_media_format() for this NOR flash setup (e.g., sector size, cluster size, number of FATs)?
  2. Is there a formula or guideline for determining these parameters when using NOR flash with FileX/LevelX?
  3. I was able to initialize the media with a size of 150 KB—what is the minimum required size for successful media initialization

 

Thanks

Shilpa

 

2 replies

Tesla DeLorean
Guru
July 2, 2025

You should use 4KB sectors. 1 per cluster.

Instrument the IO layer to understand why it fails.

 

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Technical Moderator
July 2, 2025
"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question.Saket_Om"