cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H735 ETH_IRQHandler() is not called

MStei.4
Associate III

Dear Forum,

I am using STM32H735 with RTOS LwIP with a DP83826 PHY, and want to see at least a ping on the network.

From HW point of view the PHY seems to work because I can communicate with it and read config registers. The strap pins are set to a valid default configuration.

0693W00000WJdmFQAT.pngOn the Rx0+Rx1 pins at the uC I can see some incoming frames (oscilloscope), but there are no output Tx0/Tx1 frames visible.

0693W00000WJdkyQAD.png 

I have checked my configuration against a Nucleo-STM32F439ZI configuration, where a ping works well.

The LWIP_RAM_HEAP_POINTER was configured wrong, but I have set the address in the lwipopts.h file to 0x30004000, so no hard fault anymore.

The function ETH_IRQHandler() is not called event though the NVIC init functions are set:

void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle)

{

...

  /* Peripheral interrupt init */

  HAL_NVIC_SetPriority(ETH_IRQn, 5, 0);

  HAL_NVIC_EnableIRQ(ETH_IRQn);

...

}

I did also generate a code sample (just for comparision) with cube with STM32H735 and RTOS and LwIP, but I have no clue where to search or what to check anymore. I have increased the Task Stack a little above the cube-default, but no luck yet.

There is no entry of the MAC in the ARP table of course.

Is there anything else I can check?

5 REPLIES 5
Imen.D
ST Employee

Hello @MStei.4​ ,

Check the PHY parameter for the Ethernet interface.

Is the PHY Address defined in 0?

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

He said that he can read the PHY registers. And a wrong PHY address will not stop ETH peripheral interrupts from functioning.

Hello, yes reading / writing PHY registers works fine

DP83826_BMCR: 00003000

DP83826_BMSR: 0000786d

DP83826_PHYIDR1: 00002000

DP83826_PHYIDR2: 0000a111

DP83826_PHYSTS: 00004f11

DP83826_PHYSCR: 0000010b

DP83826_PHYCR: 00008401

The PHY Address is in PHYCR Bit0-4 and is 1, I hope also that I do not have configured something wrong, but the strap pins are setup for basic-mode including RMII interface. rxclk = 50MHz, Bias resistor is correct. 100Mbit is set... all according data sheet. I will investigate in the deadlock that you wrote below, thank you!

Maybe my problem is more fundamental. It was a good hint with the tx deadlock, I did the change as described below in the low_level_init but did not help so far.

/* 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);

The ETH_IRQHandler() is hit once, I haven't seen it before because of debugging the wrong code part, shame on me. But the error is still the same.

After the IRQHandler hit I press run and pause and then, the heth structure states show that:

gState: 0x23 /*!< an internal process is started       */

ErrorCode: 0x08 /*!< DMA transfer error */

DMAErrorCode: 0x4080

I still don't know what is the reason. What else I can chreck here?