Hi,
I'm trying to use the second ethernet interface (fec2) on the Cortex-M4 core with FreeRTOS , while Linux is running in parallel. Using the second ethernet interface from FreeRTOS works fine, but when I start Linux in parallel, both OS hang after a while.
I changed the device tree so that fec1 and fec2 are disabled!
But it does not work.
Can you give me a hint about what needs to be set that I can use the second ethernet interface (fec2) in FreeRTOS that runns on the Cortex-M4 core while Linux is running in parallel?
Thanks in advance.
Best regards,
Andreas
Thanks for the quick response. But I think it is not the same issue, because Linux does not hang during the boot process. It hangs approximately some seconds after the "Welcome" message of Linux (Debian Buster). I have also tried to start the Cortex-M4 directly from Linux. I got the same result. After some seconds nothing works anymore.
Do you know if Linux loads some device drivers after the boot process that can cause this conflict?
The two fec interfaces are definitly not recogized during boot. There is no corresponding message in the console.
I have also tried to use a kernel with excluded "Ethernet driver spport" but this setting does not change anything.
What I can say is that configuring the clocks for the fec device in Cortex-M4 does not cause the failure, because FreeRTOS and Linux hang after those configuration at an other position in my code (does not matter if starting Cortex-M4 from U-Boot or Linux). It seems sending some TCP/IP pakets leads to this behaviour. As mentioned earlier, the code works fine without starting Linux.
It would be great if you could give me a hint of what else could possibly be tried.
Best regards,
Andreas
Hi Andreas
unfortunately debian is not supported by NXP for i.MX7D. Suggest to try NXP official linux releases
from source.codeaurora.org/external/imx/linux-imx repository
https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_5.4.70_2.3.0
In general one can try to debug it and find place is code where hanging happens, use
AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors
https://www.nxp.com/docs/en/application-note/AN4553.pdf
In particular check if ENET RX/TX data buffers could overwrite memory regions used by linux
and check RDC permissions for both ENETs.
Best regards
igor
Hi Igor,
thanks a lot. I found the problem that is causing both OS's to hang. It was the RDC permission, like you said.
Due to the fact that fec1 and fec2 share the MDIO bus for configuring the PHYs, I set the RDC for both interfaces as follows:
Hi Andreas
one can look at similar issue on
Best regards
igor