cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX, FREERTOS and LWIP using STM32H743XI troubles

Roberto C
Associate III

Hello to everyone,

I'm using a custom board based over STM32H743XIH6.

I'm developing a project that need to use TouchGFX, FreeRTOS and LWIP over ethernet.

 

My first goal it's to be able to PING the card while TouchGFX is running, but i'm having lot of problems (hardfoults)

 

If I enable only TouchGFX + FreeRTOS  all run well

If I enable only LWIP + FreeRTOS  I can PING the card

If I enable all (LWIP-FREERTOS-TouchGFX) I have lot of problems (HardFAULTS).

Someone could share a simple project that can use all of them?

I'm using a Custom board but i could try to a NUCLEO H743ZI  KIT too.

Best Regards.

Roberto

 

 

2 REPLIES 2
STackPointer64
ST Employee

Hello @Roberto C,

It appears to be an integration issue. Could you please share where you are placing your LwIP descriptors? Additionally, please provide your STM32CubeMX .ioc configuration file and your linker file (.ld) so I can review them. A screenshot of your call stack when the application hard faults would also be helpful. Does your custom board have external SDRAM mounted for use by TouchGFX?

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

Hello STackPointer64,

Thnx for your answer.

 

 hardfault stack:

It happen at very starting point (I suppose when freertos need to start, becouse Tim1 is used for systimer

The MX_LWIP_Init() isn't called yet, but is compiled. To avoid hard fault, i need to comment it:

// MX_LWIP_Init();

The hardfault stack:

RobertoC_0-1763650066844.png

.................

...............

Lwip buffer location: (from file Ethernetif.c


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 */
uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_RX_BUFFER_SIZE] __attribute__((section(".RxArraySection"))); /* Ethernet Receive Buffers */

..................

..................

in attached file the linker file.

 

Best regards.