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

Troubles with fopen()

Hi. I'm trying to use EFS in SPI flash. All libraries and sources are included in project according to rl-arm_gs.pdf and I set heap to 0x1000. finit() and fformat() functions works normal, but when I call

fopen("file.log", "wb");

it calles ReadData() function from FS_SPI_FlashPrg.c with ardess 0x1FFFC and read 8 bytes. After that it calles ReadData() again with previous adress decreased by 8 bytes and read 8 bytes again. When it reachs adress 0x0 it calles ReadData() again with 0xFFFFFFFC adress and again read 8 bytes. So it continues indefinitely. I have no idea why. And I don't know why the function begins reading from 0x1FFFC and 0xFFFFFFFC (spi flash has only 0xFFFFFF bytes). When I call fopen() with "wb+" it returns 0.
Does anybody know why it happens?
I use lpc1768, SST25VF032B (spi flash).

Sorry, my english isn't good yet.