2025-08-05 9:38 AM
Hey Team,
I want to make LWIP and TouchGfx to work together for our next product. I have taken reference from here:
1. Touchgfx is working as expected
2. I am not able to ping using etherenet. I am not sure the issue here.
Please let me know what needs to be done here.
Thanks.
(Reposting this question as my previous post closed by mistake)
2025-08-05 12:36 AM
Hey Team,
I want to make LWIP and TouchGfx to work together for our next product. I have taken reference from here:
1. Touchgfx is working as expected
2. I am not able to ping using etherenet. I am not sure the issue here.
Please let me know what needs to be done here.
Thanks
2025-08-05 1:27 AM
@PushparajAdka does you board supports Ethernet MII interface? if not then try RMII interface, and double check your CubeMx Pin mapping with yours board data sheet/ schematic.
if your board supports MII then check this ioc file. i have made some changes in yours ioc file.
2025-08-05 1:47 AM
Hello @PushparajAdka ,
Did you try the example from the STM32H7-LwIP-Examples repository for the STM32H750 Discovery Ethernet? You can find it here:
https://github.com/stm32-hotspot/STM32H7-LwIP-Examples/tree/main/STM32H750_Disco_ETH
Br
2025-08-05 2:05 AM
2025-08-05 2:16 AM
I am not able to share the entire project due to size issues. Let me know if you want to verify any certain configuration.
2025-08-05 2:29 AM
The given examples are separate code and they do work. But my issue is combined code with touchgfx.
2025-08-07 4:05 AM
Could you please provide some support? Otherwise I may have to stop using STM and move on to some other devices as I have to confirm the working of the device asap.
2025-08-07 6:18 AM
Hello @PushparajAdka
What tests/investigations/debugging have you done to find out what's going on?
2025-08-07 7:56 AM
Hey Saket,
I have made MPU configurations and Initialized LWIP as static config. Let me share all my observations.
MPU for LWIP heap:
*/
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.BaseAddress = 0x30020000;
MPU_InitStruct.Size = MPU_REGION_SIZE_128KB;
MPU_InitStruct.SubRegionDisable = 0x0;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
MPU for Eth Buffers:
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Number = MPU_REGION_NUMBER5;
MPU_InitStruct.BaseAddress = 0x30040000;
MPU_InitStruct.Size = MPU_REGION_SIZE_32KB;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Enables the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
Flash:
/* Modification start */
.lwip_sec (NOLOAD) :
{
. = ABSOLUTE(0x30040000);
*(.RxDecripSection)
. = ABSOLUTE(0x30040100);
*(.TxDecripSection)
. = ABSOLUTE(0x30040200);
*(.Rx_PoolSection)
} >RAM_D2
/* Modification end */
etherenetif.c
static uint8_t RxAllocStatus;
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma location=0x30040000
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */
#pragma location=0x30040100
ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */
#elif defined ( __CC_ARM ) /* MDK ARM Compiler */
__attribute__((at(0x30040000))) ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */
__attribute__((at(0x30040100))) ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */
#elif defined ( __GNUC__ ) /* GNU Compiler */
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); /* Ethernet Rx DMA Descriptors */
ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection"))); /* Ethernet Tx DMA Descriptors */
#endif
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma location = 0x30040200
extern u8_t memp_memory_RX_POOL_base[];
#elif defined ( __CC_ARM ) /* MDK ARM Compiler */
__attribute__((section(".Rx_PoolSection"))) extern u8_t memp_memory_RX_POOL_base[];
#elif defined ( __GNUC__ ) /* GNU */
__attribute__((section(".Rx_PoolSection"))) extern u8_t memp_memory_RX_POOL_base[];
#endif
/
* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void *argument)
{
/* init code for LWIP */
printf("LWIP Started!\r\n");
MX_LWIP_Init();
printf("LWIP Working !\r\n");
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(100);
}
/* USER CODE END 5 */
}
Please let me know if you need anymore details. I am not understanding why code does not initialize LWIP