2023-04-11 06:44 PM
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.
Solved! Go to Solution.
2023-04-26 02:29 PM
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.
2023-04-25 06:07 AM
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
2023-04-25 08:49 AM
#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.
2023-04-25 08:57 AM
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
2023-04-26 01:32 PM
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
2023-04-26 02:29 PM
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.
2023-04-27 01:28 AM
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