-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an approach to connect ethernet (wchnet)? #11
Comments
Thanks. Ethernet is not implemented yet. |
Dear @andelf, |
If needed I can help on this one, I have the same ch32v307 dev board in my parts bin, but most the work I've done has been for the ch32v203 chips. |
@andelf has there been any significant advancement on the Ethernet part? I've been looking a bit into Ethernet for the CH32V208 on my side. As others pointed out, it seems that STM32F4xx code should work on the CH32. So I was planning on frankensteining the STM32 with ch32-hal, but if you already have a WIP maybe I can help. |
I am also still in the process of finding a solution. I have used the time to implement and connect further modules. Now all that's really missing is ethernet! @chmousset Are there any initial results with the Frankenstein Monster? |
@christopherkutzmann not much. I did a little digging and here are my notes: CH32 have two Ethernet controllers:
10M MAC (CH32V208, CH579)This one is simpler than the STM32's. It's barely more complex than an SPI controller, so it can be implemented from scratch relatively quickly. Not that I found any usable reference anyway... It's also a bit restrictive on the system clock, as FSYS has to be 60 or 120MHz. status: I'm in the process of adding the register and peripheral definition to ch32-data, and will probably try to get a link up and running tomorrow. 10/100/1G MAC (CH32V307)Comparing STM32 RM and CH32 RM indicate that the this MAC is most likely compatible with
disclaimer: I didn't check all the registers status: Since I don't intend on using any uC using this MAC, I stopped working on that. |
TX works on the CH32V208! experimentation project: https://github.com/chmousset/rs-ch32v208-eth |
Hello!
This project is awesome and must be driven forward. I have successfully port my interrupt switch logic from EmbeetleIDE (c) to this format and rust. It is much cleaner and it consumes less current. Now i am facing the final task: to send short mqtt messages from the ch32v307 (CH32V307V-R1-1v0). I already have it working in an Embeetle project in c, but now I want to use ethernet with rust and this embassy. I've already read a lot about embassy-net(-driver/-channel etc.), but haven't found the right solution for me.
I think I can also just include the wch-ethernet library and use it, but I'm really looking for the right way to do it.
Does anyone have an idea or even a solution?
Board: https://github.com/openwch/ch32v307/tree/main/SCHPCB/CH32V307V-R1-1v0
Ethernet example: https://github.com/openwch/ch32v307/tree/main/EVT/EXAM/ETH/MQTT
Ethernet Library: https://github.com/openwch/ch32v307/tree/main/EVT/EXAM/ETH/NetLib
Many thanks,
Chris
The text was updated successfully, but these errors were encountered: