-
Notifications
You must be signed in to change notification settings - Fork 122
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
hal_mac_lld.c - added support for fixed link connection #83
base: master
Are you sure you want to change the base?
hal_mac_lld.c - added support for fixed link connection #83
Conversation
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.
Needs to conform to the way ChibiOS configures things
|
||
maccr = ETH->MACCR; | ||
|
||
/* Fixed link connection defined in board.h.*/ | ||
#if !defined(BOARD_PHY_FIXED_LINK) |
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.
So I think what you need to do is add a config item to hal_mmc_lld.h, something like:
/**
* @brief <docs in here>
*/
#if !defined(STM32_MAC_PHY_FIXED_LINK) || defined(__DOXYGEN__)
#define STM32_MAC_PHY_FIXED_LINK FALSE
#endif
/**
* @brief <docs in here>
*/
#if !defined(STM32_MAC_PHY_FIXED_LINK_TYPE) || defined(__DOXYGEN__)
#define STM32_MAC_PHY_FIXED_LINK_TYPE LINK_100_FULLDUPLEX
#endif
and then adjust the source appropriately for these
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.
changes made accordingly
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.
Thanks - I will ping the ChibiOS guys
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.
Thanks !
@vrsanskytom Can you give an example of the connectivity here? Which switch are you testing this on? |
Sure, please take a look at following diagram, describing our board architecture. Onboard FMU is the device running on STM which is a subject of this issue. https://docs.airvolute.com/dronecore-autopilot/dcs2/.pilot-boards/dcs2.pilot-v-1.0/peripherals We are using ethernet switch from microchip KSZ family, but this will be common issue for all switches not mastered by STM. |
The goal of this PR is to support the case when STM32 MCU is connected through MII/RMII with fixed link parameters. For example, in more complex systems where FMU is connected directly to ethernet switch, which is not mastered by STM through MDIO bus. In this case, the link parameters are defined in board definition file.