Using RTOS queue inside lwip httpsrv

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using RTOS queue inside lwip httpsrv

1,033 Views
pjanco
Contributor III

Hi,

I am using MIMXRT1060-EVK board and MCUExpresso IDE 11.1.1.

I am facing weird problem with using queue from inside of Lwip Httpsrv CGI callback function. For demonstration of my problem I prepared everythink into SDK example code "evkmimxrt1060_lwip_httpsrv_freertos". My changed project is in attachment.

If I am reading and writing to queue from main_thread, it is working fine. But if I try to read or write to queue from cgi_example function, it did not work.

I can see, I am calling xQueueReceive with first argument containg value 0x200111f4. But when it jump inside of function xQueueReceive, first argument cointain value 0x20010d9c and also other two arguments are wrong!

Can someone tell me what is wrong?

0 Kudos
4 Replies

904 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi  Peter Janco ,

  Will help you to test it, please keep patient, any updated information will let you know.

Best Regards,

Kerry

0 Kudos

904 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Peter Janco,

  Do you enable the IDE optimization or not on your side?

  Could you please also share some debug wrong value screenshot on your side?

Best Regards,

Kerry

0 Kudos

903 Views
pjanco
Contributor III

Hi,

weird thing is, even if value of "xQueue" argument in function "xQueueReceive" is wrong, it looks like data are copied into destination at the end of function.

Maybe just wrong value is diplayed in debug pop-up window because of cache or something like this.

Optimalization:

pastedImage_1.png

Good value:

pastedImage_4.png

Wrong value:

pastedImage_5.png

Regards,

Peter.

0 Kudos

903 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Peter Janco,

    Thanks for your updated information.

    So, do you try to disable the cache.

    Or use the printf, to print out the related data, especially the wrong data, whether it has any difference?

Best Regards,

Kerry

0 Kudos