Skip to content
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

[msom] Fix ethernet cs, reset, interrupt GPIO pins for M2 eval #2690

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

scott-brust
Copy link
Member

Problem

GPIO pins for ethernet on msom platform were not updated to match M2 eval board pinout

Solution

Fix it

Steps to Test

Enable ethernet feature

System.enableFeature(FEATURE_ETHERNET_DETECTION);

Reset and try ethernet on M2 eval

Example App

Use snippet to print ethernet configuration / state

auto conf = Ethernet.getConfig();
uint8_t ethernet_mac[6] = {};
Ethernet.macAddress(ethernet_mac);
Log.info("MAC: %02X:%02X:%02X:%02X:%02X:%02X",
    ethernet_mac[0],ethernet_mac[1],ethernet_mac[2],
    ethernet_mac[3],ethernet_mac[4],ethernet_mac[5]);


Log.info("localIP: %s", Ethernet.localIP().toString().c_str());
Log.info("DHCP: %s", Ethernet.dhcpServerIP().toString().c_str());
Log.info("Gateway IP: %s", Ethernet.gatewayIP().toString().c_str());
Log.info("Subnet Mask: %s", Ethernet.subnetMask().toString().c_str());


for (const auto& addr: conf.addresses()) {
    Log.info("Addr: %s/%u (%s) - family = %d", addr.address().address().toString().c_str(), (unsigned)addr.prefixLength(), addr.mask().address().toString().c_str(), addr.family());
}
for (const auto& addr: conf.dns()) {
    Log.info("DNS: %s", addr.toString().c_str());
}
Log.info("Gateway: %s", conf.gateway().toString().c_str());
Log.info("Source: %d/%d", (int)conf.source(AF_INET), (int)conf.source(AF_INET6));

References

Links to the Community, Docs, Other Issues, etc..


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@scott-brust scott-brust merged commit 0042084 into develop Aug 28, 2023
1 check passed
@scott-brust scott-brust deleted the fix/msom-ethernet-pins branch August 28, 2023 16:40
@technobly technobly added this to the 5.5.0 milestone Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants