-
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
Supports auxiliary power control. #2774
base: develop
Are you sure you want to change the base?
Conversation
…s set in STARTUP() in user application
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.
I tested MSOM on an old EVB, with the onboard wiznet chip (just to make things easier)
I confirmed that the D23 / aux power pin is asserted on boot before setup() completes, and that the en2 netif is populated (because the EVB already powers it on by default).
I confirmed that when pulling the ethernet jumpers, and breaking ethernet communication to the msom, that the en2 netif is removed from the list of lwip IFs after boot.
I think the PR as currently written can be used for muon / m2 breakout to control the aux power at boot
|
||
#if HAL_PLATFORM_POWER_MANAGEMENT_OPTIONAL | ||
if (!detect()) { | ||
return; |
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.
Maybe Log a warning here to make it clear PMIC isnt detected?
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.
Also, previously this would call self->deinit();
Do we need to call this still in this case or if we are exiting during init, there is nothing to de-init at this point? (maybe just unconfigure the aux power control pin?)
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.
I think the previous goto exit
, in which it calls self->deinit()
is mainly for calling os_thread_exit()
to exit the thread. But here is the very begining of the init()
function, if the PMIC is not detected we can simply return. As for the aux power control pin, it is required when the power module for DC power supply is installed, on which there is no PMIC, but we still need to enable the aux power control pin.
Example App
Completeness