RNDIS + lwIP + FreeRTOS on CH32V307 not working #1891
Replies: 4 comments 9 replies
-
How do you setup RNDIS ? What do you enable ? What do you disable ? Where do you try ? What is code ? What are the system logs ? Did you put a USB sniffer ? How did you configure lwiP ? How did you configure FreeRTOS ? Did you try your FreeRTOS+lwIP configuration with an Ethernet micro to be sure it is working ? Do you have a DHCP server ? With RNDIS you need to assign an IP address to the USB host, unless you use locally administered addresses (unfortunately I don't remember how to do that) |
Beta Was this translation helpful? Give feedback.
-
Please compare your setup with this working example: https://github.com/cesanta/mongoose/tree/7.9/examples/stm32/nucleo-f429zi-usb-rndis |
Beta Was this translation helpful? Give feedback.
-
I think I can narrow down this problem to the porting with CH32V307. |
Beta Was this translation helpful? Give feedback.
-
ch32v307 is a new port, and still considered as WIP. I have no surprise if an advanced/complicated class driver such as rndis/ecm doesn't work on it yet. I don't have time to at ch32v307 for now, though have you tried the stock net_lwip_webserver example without freeRTOS, just to see if that work ? it could be the dcd race condition with preempted RTOS. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm working on enabling rndis/ecm on CH32V307, however, it didn't work.
I tried to build a CDC+MSC example with this hardware setup and it's working, so I expect the hardware and the porting to be good.
When I set the debug level as 2 and run the program, I saw these logs.
`
SystemClk:144000000
FreeRTOS Kernel Version:V10.4.6
USBD init on controller 0
sizeof(usbd_device_t) = 83
sizeof(tu_fifo_t) = 20
sizeof(tu_edpt_stream_t) = 104
NET init
USBD Bus Reset : High Speed
USBD Setup Received 80 06 00 01 00 00 40 00
Get Descriptor Device
Queue EP 80 with 18 bytes ...
USBD Xfer Complete on EP 80 with 18 bytes
Queue EP 00 with 0 bytes ...
USBD Xfer Complete on EP 00 with 0 bytes
USBD Bus Reset : High Speed
USBD Setup Received 00 05 01 00 00 00 00 00
Set Address
USBD Xfer Complete on EP 80 with 0 bytes
USBD Setup Received 80 06 00 01 00 00 12 00
Get Descriptor Device
Queue EP 80 with 18 bytes ...
USBD Xfer Complete on EP 80 with 18 bytes
Queue EP 00 with 0 bytes ...
USBD Xfer Complete on EP 00 with 0 bytes
USBD Setup Received 80 06 00 0F 00 00 05 00
Get Descriptor BOS
Stall EP0
USBD Setup Received 80 06 00 0F 00 00 05 00
Get Descriptor BOS
Stall EP0
USBD Setup Received 80 06 00 0F 00 00 05 00
Get Descriptor BOS
Stall EP0
USBD Setup Received 80 06 00 02 00 00 09 00
Get Descriptor Configuration[0]
Queue EP 80 with 9 bytes ...
USBD Setup Received 80 06 00 02 00 00 09 00
Get Descriptor Configuration[0]
Queue EP 80 with 9 bytes ...
USBD Setup Received 80 06 00 02 00 00 09 00
Get Descriptor Configuration[0]
Queue EP 80 with 9 bytes ...
USBD Bus Reset : High Speed
USBD Setup Received 80 06 00 01 00 00 40 00
Get Descriptor Device
Queue EP 80 with 18 bytes ...
USBD Xfer Complete on EP 80 with 9 bytes
Queue EP 00 with 0 bytes ...
USBD Setup Received 80 06 00 01 00 00 40 00
Get Descriptor Device
Queue EP 80 with 18 bytes ...
USBD Xfer Complete on EP 80 with 18 bytes
Queue EP 00 with 0 bytes ...
USBD Bus Reset : High Speed
USBD Setup Received 00 05 0A 00 00 00 00 00
Set Address
USBD Setup Received 00 05 0B 00 00 00 00 00
Set Address
USBD Xfer Complete on EP 80 with 0 bytes
USBD Setup Received 80 06 00 01 00 00 12 00
Get Descriptor Device
Queue EP 80 with 18 bytes ...
USBD Xfer Complete on EP 80 with 18 bytes
Queue EP 00 with 0 bytes ...
USBD Xfer Complete on EP 00 with 0 bytes
USBD Setup Received 80 06 00 0F 00 00 05 00
Get Descriptor BOS
Stall EP0
USBD Setup Received 80 06 00 0F 00 00 05 00
Get Descriptor BOS
Stall EP0
USBD Setup Received 80 06 00 0F 00 00 05 00
Get Descriptor BOS
Stall EP0
USBD Setup Received 80 06 00 02 00 00 09 00
Get Descriptor Configuration[0]
Queue EP 80 with 9 bytes ...
USBD Setup Received 80 06 00 02 00 00 09 00
Get Descriptor Configuration[0]
Queue EP 80 with 9 bytes ...
USBD Setup Received 80 06 00 02 00 00 09 00
Get Descriptor Configur
`
Anyone had the idea on how to solve this?
Beta Was this translation helpful? Give feedback.
All reactions