I found out Keil Embedded File system does not support opening more than 2 files at the same file.
I have unit test to prove it now.
Is this limitation with Embedded File system?
We have more than 2 HTTP sessions. these HTTP session trying to open more than 2 files simultaneous using fopen. then browser HTTP Get request fails for some files.
I try setting File : File_config.c Embedded File System Number of Files > 3
If I try opening more than 3 files at same time. fopen hangs.
I am using External NOR Flash memory with SPI driver.
If I have only 2 HTTP sessions and Number of Files =2 then it works but browser load very slowly first time if no cache for any files.
I have few html, JS and css files.
Have Keil test their HTTP server with Embedded File System or we need to use SD card with FAT File system.
Embedded File System should normally open more than 2 files at the same time, since number of concurrently open files is defined with "Number of open files" configuration option.
Is you heap setting correct? File System needs 592 bytes of heap for each opened file (heap size = open_files * 592 bytes)
How are you calling fopen (as a read, or a write..)?
www.keil.com/.../group__stdio__routines.html
What version of the tools, middleware are you using?
www.keil.com/.../group__net__http_func.html
Is it possible you are accidentally trying to write to the same file in 2 different threads?
To better diagnose this, I recommend using the debug variant of the TCP Middleware stack. Depending how you configure the tcp_debug.c, this library will send out telemetry via the serial / itm printf window of what is going on.
See the 'Enabling Debug' of
www.keil.com/.../network_create_app.html