Skip to main content
Graduate
April 12, 2023
Solved

Why would the NxWebServer example stop firing the webserver_request_notify_callback?

  • April 12, 2023
  • 5 replies
  • 1694 views

I have ported the NxWebServer example from the STM32H735-DK project over to the STM32H743i-eval. All the bugs seem to be worked out and connection is being made. I can see get requests coming in to the call back but after the second or third file for the main webpage the callbacks stop.

I have tried slowing the SDMMC clock, Disabling Cache, to no avail. I have tried using the debugger to pause the code when the callbacks stop and the the code is always in the RTOS idle state with all the tasks either suspended or completed with the exception of the remaining sleeping thread that checks for connection status once every 10 seconds. On occation I will get the whole web page but that is very rare.

Not sure where else to look.

    This topic has been closed for replies.
    Best answer by GreenGuy

    Problem solved.

    The issue was the number of NetXDuo Pool Size in number of Packets set to 10(default)

    Increase it to 40 on a hint from Hhaon.1 in another post. Once the server start reporting the number of packets being used averaging around 40 I bumped it to 50.

    5 replies

    ST Employee
    April 25, 2023

    Hi,

    Could you please mention the NX_APP_MEM_POOL_SIZE that you configured under app_azure_rtos_config.h ?

    In order to check NxPool starvation, could you please check in runtime nx_packet_pool_available within your NX_PACKET_POOL ?

    Regards

    Mahdy

    GreenGuyAuthor
    Graduate
    April 25, 2023

    #define NX_APP_MEM_POOL_SIZE                    1024*120

    which I increased sometime ago as a test to see if that was the issue and the increase to what it is now did not make any difference in how the problem is manifested.

    the Nx App memory pool is located at 0x30008200 and has 23420 Used and 99460 Free with a total size of 122880 with 11 fragments.

    GreenGuyAuthor
    Graduate
    April 25, 2023

    It is interesting that I have allocated a Nx server pool section but nothing shows up in the ThreadX Memory Block Pools view.

    This is from the linker file:

    .nx_data (NOLOAD) :

    { . = ALIGN(32);

    . = ABSOLUTE(0x30000200);

    *(.NxServerPoolSection)

    . = ABSOLUTE(0x30008200);

    *(.NetXPoolSection)

    } >RAM_D2

    GreenGuyAuthor
    Graduate
    April 26, 2023

    i have tracked to the error to a DMA issue although I do not yet know the root cause.

    Printf statements in the stm32h7xx_hal_eth.c, inside the HAL_ETH_IRQHandler function show that the area where checks on the DMA are made (/* ETH DMA Error */), the heth->DMAErrorCode has three bits set:

    ETH_DMACSR_ETI - Early Transmit Interrupt

    ETH_DMACSR_RBU - Rx Buffer Unavailable

    ETH_DMACSR_AIS - Abnormal Interrupt Summary

    Still do not know the root cause

    GreenGuyAuthorAnswer
    Graduate
    April 26, 2023

    Problem solved.

    The issue was the number of NetXDuo Pool Size in number of Packets set to 10(default)

    Increase it to 40 on a hint from Hhaon.1 in another post. Once the server start reporting the number of packets being used averaging around 40 I bumped it to 50.

    ST Employee
    April 27, 2023

    Hi @Community member​ ,

    I'm glad to hear that your problem is resolved.

    Indeed, NxPool starvation is a recurrent issue when porting NetXDuo application.

    Thanks for your contribution in STCommunity. 

    Regards

    Mahdy