-
Notifications
You must be signed in to change notification settings - Fork 511
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
Makes the Ethernet interrupt pin optional. #2775
base: feature/muon-som-evb
Are you sure you want to change the base?
Conversation
How does this work in safe mode when the app can't reconfigure the ethernet interface? |
The Ethernet config data is stored in system cache, which is a file in littlefs. |
Does this Ethernet remaping interface already address this PR? https://docs.particle.io/reference/device-os/api/ethernet/ethernet/#pin-configuration-ethernet |
No, that feature requires the INT pin to be a valid pin. This PR removes the constraint based on that feature and also makes minor changes to the WizNetif to make sure Ethernet can receive packets without relying on interrupt. |
c40accc
to
ab943f2
Compare
b767169
to
ef300c8
Compare
@@ -147,9 +147,6 @@ int WizNetifConfig::getConfigData(WizNetifConfigData* configData) { | |||
if (configData->reset_pin == PIN_INVALID) { | |||
configData->reset_pin = HAL_PLATFORM_ETHERNET_WIZNETIF_RESET_PIN_DEFAULT; | |||
} | |||
if (configData->int_pin == PIN_INVALID) { | |||
configData->int_pin = HAL_PLATFORM_ETHERNET_WIZNETIF_INT_PIN_DEFAULT; | |||
} |
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.
NOTE: We will have to update the docs to spell out the fact that if you want to set the INT pin back to it's default value, you must know what it is and set it explicitly.
See here: "If you want to restore one or more pins as their default value, use PIN_INVALID, and the default will be used for that pin."
https://docs.particle.io/reference/device-os/api/ethernet/pin-configuration-ethernet/
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.
Cc. @rickkas7
It is important to note that if a custom configuration is required, the correct system parts need to be flashed to the device so that it does not rely on booting into Safe Mode for the first connection to the Cloud. This NOTE should also be added to the Docs. |
NOTE: this PR is targeting the
feature/muon-som-evb
branchProblem
Currently W5500 interrupt pin is essential for Ethernet to be functional. However, for the Ethernet feather wing from Adafruit doesn't expose the interrupt pin to side headers, indicating that the interrupt pin is optional to the Ethernet interface.
Solution
Allow the
int_pin
inWizNetifConfigData
to bePIN_INVALID
and use query scheme inWizNetif
when the interrupt pin is not present.Steps to Test
Example App
References
N/A
Completeness