-
Notifications
You must be signed in to change notification settings - Fork 21
Add CompositeEMAC support for Nuvoton M480 #459
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
Conversation
connectivity/drivers/emac/TARGET_NUVOTON_EMAC/TARGET_M480/NuvotonM480EthMAC.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test the PR locally and OK.
Thanks for the review! By the way, if you guys are interested in adapting your other target families to use CompositeEMAC, I would be happy to help debug and review! It should reduce the total amount of code that you have to maintain by a fair bit, and provide speed and memory usage improvements. |
Summary of changes
Now that I have an M480 board, I figured I would try and upgrade its Ethernet implementation to use the new CompositeEMAC structure. This lets the target-specific part of the code be as small as possible, as most of the work is done in the generic EMAC, PHY, and DMA drivers.
The old driver worked fine, and passed nearly all of the network tests. As far as I could tell, the only omissions were power-down support and multicast support. However, using CompositeEMAC brings new features, such as zero-copy Rx, which should help the code run a little faster. (though sadly zero copy Tx isn't really possible on this device since the hardware doesn't support sending multiple buffers at a time) Also, it just removes duplicated code and helps more of the Ethernet drivers use the same common core.
Impact of changes
Nuvoton M480 Ethernet support now implemented using CompositeEMAC.
Migration actions required
None
Documentation
Pull request type
Test results