cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723VGT6 not working with DP83848 - HardFault is occurring

Osman40
Visitor

Hello Everyone,

I designed pcb while to use STM32H723VGT6. I used an Ethernet phy called DP83848 to communicate via Ethernet.

I have previously used this Ethernet phy with F4 series processors and communicated via Ethernet without any problems. I am using CubeIDE version 1.18.0. I make the settings from CubeIDE as follows.

  • I am setting RMII mode in ETH from connectivity. I am changing MAC address and i am enabling ethernet global interrupt from NVIC.
  • I am enabling LWIP from Middleware and software Packs. I am disabling DHCP Module and i am setting IP and Subnetmask from general settings. Then I set my phy from platform settings. Only LAN8742 appears in the list.I build the code by selecting this Phy.
  • Then I add the dp83848.c and .h files that I generated for the F4 series to my own project. In ethernetif.c, I replace everything related to LAN8742 with DP83848 functions. All of the functions have the same name. I build the code and no problems occured during the build.
  • I uploaded the code into the processor and saw that phy was working correctly in debug mode. I received no PING messages. After a while HardFault_Handler was occurred. 

    I wrote the following into HARDFAULT_HANDLER:

    uint32_t cfsr = SCB->CFSR;
    uint32_t hfsr = SCB->HFSR;
    uint32_t bfar = SCB->BFAR;
    uint32_t mmfar = SCB->MMFAR;
    and the resulting values ​​are:
    cfsr = 0x400,
    hfsr = 0x40000000,
    bfar = 0,
    mmfar = 0

  • I selected LAN8742, compiled the code, and uploaded it to the processor. No problems occurred. However, the network was down, and I received no PING messages. This was an expected result, as it was the wrong PHY.

I've tried different combinations for a long time, but I haven't found a solution. Can some one tell me if they have got this combo working (H7 and the DP83848), and if so, could you share some working code, please

Thanks,

Osman

 

 

1 REPLY 1
LCE
Principal II

Check your driver files.

Probably some HAL ETH stuff changed since you wrote it for F4?

I would compare the PHY's datasheets and compare / identify the important registers, then copy the LAN8742 driver files, rename and edit them according to the DP-thingy.

I would also write some UART debug code to directly read and write the PHY's registers.