2025-09-24 12:25 AM - last edited on 2025-09-24 4:07 AM by Saket_Om
I'm trying to disconnect a ethernet cable after flashing a code
Then I'm getting
[00:01:50.522,000] <err> net_tcp: net_send_data()
[00:01:52.200,000] <wrn> net_if: iface 1 is down
[00:01:52.200,000] <err> net_tcp: net_send_data()
[00:01:52.480,000] <wrn> net_if: iface 1 is down
[00:01:52.480,000] <err> net_tcp: net_send_data()
[00:01:52.900,000] <wrn> net_if: iface 1 is down
[00:01:52.900,000] <err> net_tcp: net_send_data()
[00:01:53.530,000] <wrn> net_if: iface 1 is down
[00:01:53.530,000] <err> net_tcp: net_send_data()
[00:01:54.475,000] <wrn> net_if: iface 1 is down
This is expected since trying to connect it back
When I reconnect ethernet cable
Im getting an below error
[00:01:54.475,000] <wrn> net_if: iface 1 is down
[00:01:54.475,000] <err> net_tcp: net_send_data()
[00:01:55.282,000] <inf> phy_mii: PHY (0) Link speed 100 Mb, full duplex
[00:01:56.212,000] <err> os: ***** USAGE FAULT *****
[00:01:56.212,000] <err> os: Illegal load of EXC_RETURN into PC
[00:01:56.212,000] <err> os: r0/a1: 0xaaaaaaaa r1/a2: 0xaaaaaaaa r2/a3: 0xaaaaaaaa
[00:01:56.212,000] <err> os: r3/a4: 0xaaaaaaaa r12/ip: 0xaaaaaaaa r14/lr: 0xaaaaaaaa
[00:01:56.212,000] <err> os: xpsr: 0xaaaaaa00
[00:01:56.212,000] <err> os: Faulting instruction address (r15/pc): 0xaaaaaaaa
[00:01:56.212,000] <err> os: >>> ZEPHYR FATAL ERROR 34: Unknown error on CPU 0
[00:01:56.212,000] <err> os: Current thread: 0x200233f8 (rx_q[0])
[00:01:56.307,000] <err> os: Halting system
The mcu is going halt what is the reason for this issue?
How to resolve this?
2025-09-24 1:28 AM
which sw are you running ? Some example do not implement interface management, aka cable disconneciton
2025-09-24 7:10 AM
Already checked the Zephyr ethernet source code?
These errors make sense, and as @mbarg.1 already said, some (dis-) connection management is required.
This means that the MCU periodically asks the PHY if it has some physical connection.
Ethernet Management — Zephyr Project Documentation
Not much there, but a starting point. Try to trace it back to find some periodic connection handler to the PHY.
2025-09-25 12:11 AM
Hi
You didn't mention what precise STM32F7 and what HW board you are using.
Did you look for support at Zephyr OS project ?
They have Discord channel and mailing lists:
main@lists.zephyrproject.org | Subgroups
2025-09-25 7:57 PM
Hmm looks like a bogus return address in a function, due to thread stack corruption?
2025-09-29 9:20 PM
@Pavel A. @Guillaume K @LCE @mbarg.1
Im using STM32F767ZI board zephyr is supported
I'm trying to handle the connection management through below api still Im facing same issue
2025-09-29 11:18 PM - edited 2025-09-29 11:20 PM
As far as I can see ( looking at examples in libs), threre is no code (no thread ) monitoring link status - you have to add your code - that is why call back is never called.
Unless you are running somthing different or proprietary - in that case share it to get better advice.
2025-09-30 12:33 AM - edited 2025-09-30 12:39 AM
> net_mgmt_init_event_callback(&net_cb, link_event_handler,
And what do you do in your link_event_handler() ?
Note that the net_cb struct must be valid all the time while the callback is registered (it should be "static" etc. not on a function stack).