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

Eth PHY reset time might not be long enough #141

Closed
HarryMakes opened this issue Sep 14, 2020 · 2 comments
Closed

Eth PHY reset time might not be long enough #141

HarryMakes opened this issue Sep 14, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@HarryMakes
Copy link
Contributor

When powering the board with 12V, the Ethernet PHY LAN8742A won't have enough time to reset sometimes. If the reset is done and long enough, the two LEDs on the RJ45 plug should blink briefly upon power-cycling the board - this can't be observed when the PHY hasn't been reset properly.

A solution is to lengthen the deassertion of the nRST signal to 25ms by replacing this line in src/main.rs. According to the PHY's datasheet, this should be sufficient for the duration of "external power supplies at operational level to nRST deassertion".

bors bot added a commit that referenced this issue Sep 16, 2020
144: Fix syntax for taking core peripherals (required by cortex-m-rtic v0.5.5) r=jordens a=HarryMakes

This is to fix a panicking upon initialization problem that is caused by a now undefined behaviour in our code from the perspective of the latest release of the cortex-m-rtic crate. 

As per conversation in rtic-rs/rtic#361, `context.core` should now be used instead of `cortex_m::Peripherals::take()`, which would cause some unexpected behaviour.

On a side note, a similar symptom where the Ethernet PHY does not get reset, as discussed in #141, might have also arisen from this new version of rtic. However, the reset delay still seems a bit too short to me.

Co-authored-by: Harry Ho <[email protected]>
@jordens
Copy link
Member

jordens commented Oct 13, 2020

t_RSTIA is 100 µs.

image

But arguably there should be sufficient delay between power supply ramp up and that reset. The setup before that may not take long enough.

@jordens
Copy link
Member

jordens commented Oct 26, 2020

Changing it in software doesn't appear to alter behavior. Changing it in hardware is sinara-hw/Stabilizer#84

@jordens jordens closed this as completed Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants