This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220SF-LAUNCHXL: Large data size Queue with HTTP Server

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: CC3220SF

Hi,

I am getting some sensor data from a c2000 MCU to cc3220SF MCU using SPI Communication at 1Mbps. 

These received data needs to be send to a HTTP client from HTTP Server at cc3220SF based on GET request at each 500ms. 

Below is the flow diagram - 

I am not able to create this big queue. 

I have created a small queue to send data for 1 second and then stop but that is not the sufficient solution. 

Can anyone suggest a better solution for this ?

Thank you.

Best Regards,

Kuldeep

  • Hi, 

    What is the exact issue?

    are you asking regarding the design of system or do you have any specific issue with the HTTP interface (if so please provide more details)?

    what http server implementation are you using?

    Theoretically you will need a double-buffersolution: 1 that you will fill with data from the C2000 while the other is used to send data over HTTP to the client.

    Once you get a new GET request you will switch the buffers. 

    Buffers should be > 20KB to make sure you can collect data when the HTTP GET request is delayed (as 500ms consumes ~20KB).

    Alternatively, you can use more buffer of 20KB (as you show) and use "producer" & " consumer" pointers to loop through them. 

    br,

    Kobi

  • Hi Kobi,

    Thank you for your input. Due to some other priority work I was not able to come back on this earlier. 

    are you asking regarding the design of system or do you have any specific issue with the HTTP interface (if so please provide more details)?

    It is related to both http server and system design issue.

    1. I am reading data from C2000 using SPI (3096B) at each 80ms to cc3220sf and these needs to be send to http client, also min response time for a get request is 300ms (As I check in web browser inspect element).  The maximum queue size which I can have is 5 with size of msg 3096Bytes. So, now if I want to send the data for 1 seconds then it will be 1000*3096B/80  = 38.7KByte. But I can have a queue with 5*3096=15.48KByte if I give the queue size to be 1. and these data are only for 400ms. Can you suggest any other way to store data at cc3220sf with approx 50KByte and then send data for each request after 1 second or less.

    2. Along with HTTP Server, CC3220SF is working as AP also. So, When ever I am trying to keep the HTTP client to connected for long duration its automatically getting disconnected. What can be the issue ?

    Thank you for suggestion but I am not able to create a queue more then 15.48KB that means I can't have 2 Buffers with size 20KB. Please let me know if I am misunderstanding it.

    Buffers should be > 20KB to make sure you can collect data when the HTTP GET request is delayed (as 500ms consumes ~20KB).

    Alternatively, you can use more buffer of 20KB (as you show) and use "producer" & " consumer" pointers to loop through them. 

    Thank You.

    Best Regards,

    Kuldeep 

  • How are you creating the buffers? (where is the limitation of 15.48KB?) I don't understand the source of the issue.