Skip to main content
Visitor II
July 12, 2024
Question

stm32h7 ethernet not working

  • July 12, 2024
  • 2 replies
  • 1254 views

I made several changes in ethernetif.c 

 

pbuf_ref(p);
if (HAL_ETH_Transmit_IT(&heth, &TxConfig) == HAL_OK) {
	while(osSemaphoreAcquire(TxPktSemaphore, TIME_WAITING_FOR_INPUT)!=osOK)
	{
	}
	HAL_ETH_ReleaseTxPacket(&heth);
} else {
	pbuf_free(p);
}
//////////////////////////////////////
/* create a binary semaphore used for informing ethernetif of frame reception */
 RxPktSemaphore = osSemaphoreNew(1, 0, NULL);

 /* create a binary semaphore used for informing ethernetif of frame transmission */
 TxPktSemaphore = osSemaphoreNew(1, 0, NULL);

 

 I get vApplicationStackOverflowHook  and get connected and disconnect very fast What changes should i be doing to avoid that

    This topic has been closed for replies.

    2 replies

    Super User
    July 12, 2024

    >What changes should i be doing to avoid that

    Giving it more stack ... ?

     

    maybe...read:

    https://community.st.com/t5/stm32-mcus/how-to-create-a-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308

     

    Visitor II
    July 12, 2024

    I tried to increase stack size from 512 to 1024 . Overflow doesnt happen anymore but now no connection. If ı do get connected i get overflow

    Super User
    July 12, 2024

    Please start from one of these ready examples: https://github.com/stm32-hotspot/STM32H7-LwIP-Examples

    Visitor II
    July 12, 2024

    I am already using it as template The changes i did in ethernetif.c was recommended in other posts. Still dealing with overflow with increasing stack size