cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 - FileX and MSC - Windows read wrong data

Dams
Associate III

Hi, 

I'm on a applicaiton involving USBX MSC and FileX. 
The final memory for the application is a NOR flash so I also use LevelX.

Acutally, I'm working on a nucleo-U575ZI-Q without NOR flash so I use NOR Simulator on LevelX.

My problem is that a file created with FileX is detected by windows, have the right number of bytes but data are wrong.

My program do this:

1) FileX format the device
2) FileX create the file STM32.TXT and put the data "This is FileX working on STM32". I can see this data on the RAM

3) FileX close and open the file STM32.TXT and I can read the text

4) FileX close the media.

5) USBX open the media and on Windows I see the file STM32.TXT but data are not correct. It's like if this data comes from another part on my RAM.

Dams_0-1760544703605.png

When the device is connected to a computer, I can create new file, write on it then unplug / plug USB and the new file is still here. I can also edit STM32.TXT.

Has somebody an idea about why FileX can read right data but windows doesn't read right data even if the device is mounted.

Thanks for help !

 

 

 

 

20 REPLIES 20
domero234
Associate

Hello Dams,

Can you please share your project if it is possible. I am trying learning this topics.

Thank you
Regards.