Crash happens on a printf in the prvEMACHandlerTask
Is that function calling
printf()? Who is defining
printf()? It is part of the standard C library, but it can also be overridden by your library. The kernel and FreeRTOS+TCP don’t use it ( with the exception of the WinSim project ).
The FreeROS_printf with
%ul in it causes a crash.
That is strange. Only a bad pointer
%s could cause an exception.
What do you mean with “crash”? Is that a hardware fault?
The first thing to check is the PHY initialisation. No communication is possible without a proper working Ethernet PHY.
I hope that you have some kind of logging and that you can follow the code in
xPhyDiscover() should return 1. If successful, it will print the ID as e.g. “
PHY ID 7C0F0”.
The next step is
xPhyConfigure(), in which the PHY is reset and will be configured.
The last step is
xPhyStartAutoNegotiation(), in which the auto-negotiation is started. If you board is connected t a switch or router, they will come to an agreement about the properties.
If the above steps do not work, it is useful to check the hardware initialisation of the GPIO ports, the peripheral clocks, etc