STM32H723VGT6 not working with DP83848 - HardFault is occurring
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
