-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Operating System
Linux
Commit SHA
Board
Custom stm32h747 board
Firmware
Custom stm32h747 board, but the problematic code is very similar to net_lwip_webserver with NCM config.
Alpine Linux 3.23 on the host side.
What happened ?
When the system run for the first time, everything is fine.
Configuration:
#define CFG_TUD_NCM_IN_NTB_N 2
#define CFG_TUD_NCM_IN_NTB_MAX_SIZE 2048
#define CFG_TUD_NCM_OUT_NTB_N 2
#define CFG_TUD_NCM_OUT_NTB_MAX_SIZE 2048
- Start the net_lwip_webserver-similar TinyUSB device.
- On linux, after eth1 comes up, do
ifconfig eth1 upanddhcpcd eth1 - At this point, eth1 gets an IP address (given by TinyUSB dhcpd server), and the interface can be pinged, all is fine.
- Run
ifconfig eth1 downon the Linux side. - At this point, Linux stop listening to the INTERRUPT and BULK endpoints.
- Run
ifconfig eth1 upon the Linux side. - At this point, Linux is again listening to the INTERRUPT and BULK endpoints.
- Observe that eth1 does not get an IP address anymore, because the TinyUSB device stop transmitting anything.
If I plug the debugger at this point, I notice that both xmit_free_ntb are null, but xmit_tinyusb_ntb is non null and xmit_ready_ntb[0] is non null (see image below), therefore tud_network_can_xmit() return false.
I've tried with and without DMA it makes no difference.
Anyway, I would love to have some help/idea/suggestion at this point, I'm stuck.
How to reproduce ?
See above.
Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
The following log starts at point 3) above, i.e. when everything is fine:
We can see at the end of the log, after the last ifconfig eth1 up that Linux sends DHCP Discover packets continuously, they get received by TinyUSB but generates no answer.
Screenshots
No response
I have checked existing issues, discussion and documentation
- I confirm I have checked existing issues, discussion and documentation.