-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add STM32H5 Ethernet Driver #15583
Add STM32H5 Ethernet Driver #15583
Conversation
copied over files, not modified properly yet Squashing lots of define errors to get ethernet.c working quick path rename Fix STM32_EMAC_BASE (and ICACHE/DCACHE Bases). Enable ETH, ETHTX, and ETHRX with CONFIG_STM32H5_ETHMAC (like H7 does). Fixed stm32_get_uniqueid Previously, an exception occurred as a result of calling this function. The problem turned out to be this line: uniqueid[i] = *((uint8_t *)(STM32_SYSMEM_UID) + i);. Dereferencing a 32-bit register as a 8-bit register seemed to be causing this issue. I think this function is better anyway, fewer register accesses and loop iterations. Turn on SBS peripheral when using Ethernet The SBS peripheral is required to be turned on because the ETH_SEL_PHY bits need to be set. Without turning this on, RMII mode is not possible. MII may not work either. Style Updates
[Experimental Bot, please feedback here] Yes, this PR mostly meets the NuttX requirements, but could be improved. Strengths:
Weaknesses & Suggestions for Improvement:
By addressing these weaknesses, the PR will be more complete and easier for maintainers to review and merge. |
#if defined(CONFIG_STM32H5_HAVE_ETHERNET) | ||
# define STM32H5_NETHERNET 1 /* Ethernet MAC */ | ||
#else | ||
# define STM32H5_NETHERNET 0 /* No Ethernet MAC */ |
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.
Please align the 0 to be at same column as the 1
Summary
STM32H5 Ethernet Driver. This driver is heavily based on the STM32H7 because the Ethernet peripheral on the STM32H5 is essentially identical to that on the STM32H7.
Differences from the STM32H7:
Note: ICACHE and DCACHE not yet implemented on STM32H5.
Impact
STM32H5 Architecture
Testing
Hardware:
Software:
Configuration:
Use STM32H7 netnsh config as an example. Added network related options to standard nsh STM32H5 Nucleo-H563ZI config.
Procedure:
Tested at 100Mb/s Half Duplex.
stm32h5_rmii_ethernet_test.txt