2021-01-08 01:19 PM
hi
i Use stm32f107RC and lan8720.
when MX_ETH_Init(); function run i got Hard Fault in This line:How can I solve this problem?
Solved! Go to Solution.
2021-01-12 03:39 PM
Hello
heth.Init.MACAddr is not defined as array but just as pointer
In same function, define
uint8_t mcdr[]={0x00,0x80,0xE1,0x00,0x52,0x00};//def and initialize
heth.Init.MACAddr = &mcdr[0];
2021-01-08 01:44 PM
It's an imprecise error, which means the error is probably not on the line that triggered it. Most likely the issue is elsewhere.
But you should verify that heth.Init.MACAddr points to a valid location in RAM.
2021-01-08 09:02 PM
yes
i checked the address of the variable, it is in RAM (0x200013B0)
I Changed the microcontroller IC, which is the same problem again.
2021-01-12 11:16 AM
Does anyone have an opinion?
2021-01-12 03:39 PM
Hello
heth.Init.MACAddr is not defined as array but just as pointer
In same function, define
uint8_t mcdr[]={0x00,0x80,0xE1,0x00,0x52,0x00};//def and initialize
heth.Init.MACAddr = &mcdr[0];
2021-01-12 10:31 PM
Thanks @Vangelis Fortounas
This Problem has Solved.
When I want to ping, it receives data but does not send data.
What is the problem?
�?Status 0x00D00000 is Not Defined... in Header
2021-01-13 03:22 AM
Hello
Ping uses ICMP protocol that belongs to Internet Protocol layer.
MAC layer can't unterstand what is ping. It just receives and transmits data
There are examples here and here. Not for f107 but you can take an idea what to do.
STM32CubeMX can produce working code by using ethernet interface and LWIP stack.
2021-01-13 06:43 AM
HI.
I have used the lwip functions and already got pings in the stm32f429 and lan8720.
But I can't get a ping in f1 Series .
Is there a software problem?
2021-01-14 07:16 PM
LWIP has some ICMP settings not to respond to broadcast and multicast pings. Send a unicast ping to LWIP.
Update F1 HAL to the latest version.
Compare the LWIP working settins of F429 with those of f107
Activate debuging for UDP, ICMP, and redirect the messages to a console. It will help a lot.
At last put a break inside the icmp_input(...) function and step by step find the cause of this behaviour.
2021-01-15 06:51 AM
My problem was Solved when i use CMSIS_V2 RTOS.
Thanks for the tips @Vangelis Fortounas :rose: