-
Notifications
You must be signed in to change notification settings - Fork 181
Workaround in Zynq port for missing macros when using SDT drivers #1247
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
base: main
Are you sure you want to change the base?
Conversation
If using SDT drivers, it may be necessary to define certain link speed divisor values. | ||
This is to work around a driver issue where certain link speeds will not transmit any data | ||
without defining the values. | ||
For example, it may be necessary to define: |
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.
It would be great to mention that we may define these macros in the FreeRTOSIPConfig.h so that no, library source changes are necessary.
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. That is what I intended, but I can see that it is not clear enough. I added a statement to specify that the macros can be defined in the FreeRTOSIPConfig.h.
Thanks for creating this follow-up PR and contributing to FreeRTOS+TCP. |
Workaround in Zynq port for missing macros when using SDT drivers
Description
This is a followup to PR #1227 . This is also discussed in the FreeRTOS forums
The summary of the problem is that with the new SDT drivers, Xilinx removed macros that were previously used as clock divider values for various link speeds (
XPAR_PS7_ETHERNET_0_ENET_SLCR_100MBPS_DIV0
and similar). It seems that the intention is that the macros are no longer necessary, except that some link speeds do not function without writing the macro values to theSLCR_GEM0_CLK_CTRL_ADDR
register. For me 1000Mbps worked without writing to the register but 100Mbps does not work. I have also reproduced the same problem with the Xilinx lwip port, so the problem is definitely with these missing macros.The best work around seems to be to define these missing macros in the FreeRTOSIPConfig.h for the time being. The PR changes the section of the that writes the macro values to the register. It will now write the values if the macros exist, otherwise it will not perform a write.
Test Steps
I have again tested that this code works with both the old and new Xilinx drivers. I have also tested both the old and new drivers at 1000Mbps and 100Mbps link speeds.
Checklist:
Like before the changes are limited to the portable layer, which I don't believe have any unit tests.
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.