This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

fopen() update mode problem with SPI Flash memory

Ave,
Today i encounter another problem with Keil libraries... The problem applies to fopen() function in update mode "w+" and SPI Flash memory. In such situation fopen() returns NULL. There is no problem when accessing uSD card nor SPI Flash without "+" qualifier (i.e. "w" or "a"). Documentation says it should work.
Particulary I need to create *.json file and I need to overwrite data inside the file.
Is there any solution/workaround for this? Finally I can use row data on SPI Flash memory but FAT file system is better solution.

My IDE is MDK Proffessional 4.54

Best regards,
Slavo

Parents
  • >You are right, "+" is not supported in EFS, whih means in all Flash chips

    No, the EFS is only used for NOR Flashes and SPI NOR Flashes. NAND Flashes and other media use the FAT files system. Please see for more details:
    http://www.keil.com/pack/doc/mw/FileSystem/html/index.html

    >Unfortunately the is no such a 'Note' in uVision embedded help.

    The help in uVision is identical to the help on our website. If you select 'fopen' in your source file and if you then press F1, your browser should open with this local file:

    file:///C:/Keil_v5/ARM/PACK/Keil/MDK-Middleware/6.6.0/Doc/FileSystem/html/group__stdio__routines.html#ga76a21223ed39a2692fdfc854aab93b2c

    The manuals on the web and our offline help comes from the same database.

Reply
  • >You are right, "+" is not supported in EFS, whih means in all Flash chips

    No, the EFS is only used for NOR Flashes and SPI NOR Flashes. NAND Flashes and other media use the FAT files system. Please see for more details:
    http://www.keil.com/pack/doc/mw/FileSystem/html/index.html

    >Unfortunately the is no such a 'Note' in uVision embedded help.

    The help in uVision is identical to the help on our website. If you select 'fopen' in your source file and if you then press F1, your browser should open with this local file:

    file:///C:/Keil_v5/ARM/PACK/Keil/MDK-Middleware/6.6.0/Doc/FileSystem/html/group__stdio__routines.html#ga76a21223ed39a2692fdfc854aab93b2c

    The manuals on the web and our offline help comes from the same database.

Children