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

NOR Flash EFS fopen() passes invalid address to flash driver

Hello,

It appears that when performing a fopen() operation, the EFS driver calls the flash driver ReadData() function many times. Sometimes the address provided to the driver is invalid. This is causing the fopen() operation to fail. I verified this is not a stack overflow issue.  

Keil Middleware Version 7.16.0

Event Viewer

Invalid Address Passed In

Flash Into Structure

static ARM_FLASH_INFO FlashInfo = {
NULL,
0x200000u / 0x1000u,
0x1000u,
0x100,
1,
0xFF,
#if (ARM_FLASH_API_VERSION > 0x201U)
{ 0U, 0U, 0U }
#endif
};

uVision Installation Info

Parents
  • Hi,

    what is the NOR flash base address? Valid addresses for your flash are from (BASE_ADDR) + [0 to 0x1FFFFF] and EFS should only use this range. If it uses something else, then something might be wrongly written into flash, since EFS first reads data from flash and based on the values read out, sets the next address to access (read).

Reply
  • Hi,

    what is the NOR flash base address? Valid addresses for your flash are from (BASE_ADDR) + [0 to 0x1FFFFF] and EFS should only use this range. If it uses something else, then something might be wrongly written into flash, since EFS first reads data from flash and based on the values read out, sets the next address to access (read).

Children