webserver with slow external flash and large content (not stable)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello Guys,

What could you suggest in a situation like this?

I have a dev board with a slow external SPI flash (BCM9WCD1EVAL1). I keep webcontent on the ext flash. Some of the webcontent files are quite large, about 150KB. I can see that normally it takes about >4 sec to load a front page (to receive all the needed files).

I have a problem such that the connection to the webserver is not stable. If I try and access the webserver from another instance of a web browser (PC, smartphone, tablet) the front page can load and show BUT most of the time it does not (also nothing from WPRINT_ENABLE_WEBSERVER_DEBUG)

I reckon the connection times out due to slow extenal Flash and large files.

Please advise, what shall I adjust in the configuration (TCP, HTTP, etc) in order improve the situation.

So far I have tried to increase PACKET_POOL_SIZE but without a noticeable result:

GLOBAL_DEFINES += TX_PACKET_POOL_SIZE=15 RX_PACKET_POOL_SIZE=15

and

#define HTTP_SERVER_STACK_SIZE (14000)

I would be grateful for any help on this.

Oleg

0 Likes
2 Replies
Anonymous
Not applicable

Hi Guys,

Apparently the instability was due to to the fact that external SPI flash access was unprotected in a multi-threaded application. It is quite logical for a web server application to protect SPI flash from concurrent access requests. SPI flash driver needs to be updated to be made thread safe (it is better to make a new sflash driver altogether).

Oleg

Hello,

Thank you for the details.  We are looking into this method.

0 Likes