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

FX_IO_ERROR on Fx_NoR_Write_Read_File example #24

Open
bdlr2 opened this issue May 3, 2022 · 4 comments
Open

FX_IO_ERROR on Fx_NoR_Write_Read_File example #24

bdlr2 opened this issue May 3, 2022 · 4 comments
Assignees

Comments

@bdlr2
Copy link

bdlr2 commented May 3, 2022

Describe the set-up

  • The board: STM32H735G-DK
  • IDE: IAR 9.10.2
  • Project: Fx_NoR_Write_Read_File example

Describe the bug (skip if none)

I start the example out of the box, generated with CubeMX for STM32H735G-DK. The fx_media_format at line 147 in app_filex.c returns a FX_IO_ERROR, which ends the program.

How to reproduce the bug (skip if none)

Start the app and run it step by step up to the fx_media_format call in app_filex, you'll see the return value that is not FX_SUCCESS as it should.

@ALABSTM
Copy link
Contributor

ALABSTM commented Jul 29, 2022

Hi @bdlr2,

Your report has been forwarded to our development teams. They will be back to you after a deeper analysis of the issue you reported.

With regards,

PS: Please excuse the delay it may take to reply.

@rahmanih
Copy link

Hi @bdlr2,
Did the NOR memory contain any data before running the application?

regards
Haithem.

@bdlr2
Copy link
Author

bdlr2 commented Aug 8, 2022

HI @rahmanih,

I finally found that it's indeed because of the NOR that was not completely erased that this problem happened.
I agree it's not a bug, but may I suggest to add some info about this prerequisite in the documentation, or to perform a test to erase the NOR automatically ?

Best regards

@rahmanih
Copy link

rahmanih commented Aug 8, 2022

Hi @bdlr2
Great news!
Actually, the request to erase the memory is mentioned in the README.md

The NOR flash should be erased prior to format either by the application or by the STM32CubeProgrammer, this allows LevelX and FileX to create a clean FAT FileSystem.

Chip erase operation takes considerable time when done by the application, therefore it is disabled by default.

To enable it, please define the flag LX_STM32_OSPI_ERASE to 1 in "lx_stm32_ospi_driver.h":

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

4 participants