cpu/efm32: add ethernet driver#22306
Conversation
0c09c87 to
42ecd8b
Compare
benpicco
left a comment
There was a problem hiding this comment.
Looking good, just some nits
|
Some comments on the LPC1768 driver also apply here, so I will do some minor fixups to align both drivers next week. Thanks @benpicco. |
|
Update on the preliminary test results: a ping test with 16-byte increases up to 2048 bytes has been running non-stop for the past two-ish weeks. Apart from a few switch reboots (UniFi stuff), the MCU did not crash/reboot. |
69fac13 to
457145a
Compare
|
@benpicco I think I have covered all comments so far. Can I do an intermediate squash? Mean while, I will start with final testing. Now that the |
|
Sure, please squash |
|
Update on the test reults: #22305 (comment) |
5fa16f0 to
1ed3398
Compare
|
@benpicco the last three fixup commits are the changes I did since the intermediate squash. Most of them are a consequence of the changes I did to the LPC1768 driver too. This branch is currently tested again. |
This commit adds a driver for the ethernet peripheral. It is split into a low-level peripheral driver, and a higher-level netdev driver. Two pseudo-modules are introduced for link state monitoring and auto negotiation. Kconfig support has been added too.
1ed3398 to
0f63ccf
Compare
|
Hmm, this seems to fail due to Guess that this is somewhat related to #9371 and MicroPython not using |
Contribution description
Note
Development of this PR happens in parallel to the LPC1768 ethernet driver in #22305. Any feedback on this one is likely applicable to the other one as well. I will try to keep both PRs in sync where it matters.
This PR adds an ethernet driver for the EFM32. While working on the LPC1768 version, I decided to also add support for the EFM32.
What is provided:
efm32_eth_link_up,efm32_eth_auto) like the STM32.Testing procedure
The only EFM32 board with ethernet in RIOT's code base, is the SLSTK3701a.
Like the LPC1768 ethernet driver, I would rather receive feedback on the general structure and adoption. I will then do my best to collect as much evidence as possible.
Testing has been performed as follows:
tests/drivers/efm32_ethBased on this, I believe it is in a working state.
With
efm32_eth_autoenabled, the link speed is ~7.5-10 MBit/sec (measured using lwIP iPerf).Compile test
Issues/PRs references
None
Declaration of AI-Tools / LLMs usage:
AI-Tools / LLMs that were used are:
cpu/efm32. I then refined, reworked and tested it myself. I did ask Claude Code to analyze bugs I encountered during testing. The final PR review was also done with Claude Code, but changes were applied manually. The test application, auto-init adoption and several other parts are simply copy-paste of existing drivers.