Skip to content

Fix Inconsistent Sleep Current by relocating the Ethernet Clock AGT Timer #322

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

Merged
merged 2 commits into from
May 21, 2024

Conversation

cristidragomir97
Copy link
Contributor

Description:
This pull request addresses an issue with inconsistent sleep current consumption on the board. Previously, the board would sometimes draw around 100µA and other times around 2mA. After thorough investigation, it was determined that the issue was due to the lowest power supply state (LPM_POWER_SUPPLY_DEEPCUT3) of the Renesas RA6M5 chip turning off the AGT (Asynchronous General Purpose Timer), which conflicted with the AGT timer used for the Ethernet clock defined in variant.cpp.

Changes:

  • Removed the AGT timer definition for the Ethernet clock in variant.cpp.
  • Wrapped the AGT timer functionality in the EthernetClock class
  • Added timer instantiation in the begin method of the Ethernet class.
  • Added timer deletion in the disconnect method of the Ethernet class.

Testing:

  • Verified that the board enters a consistent low-power state with current consumption around 60µA.
  • Ensured that Ethernet functionality is not impacted by the changes.

Additional Notes:

  • This fix improves power efficiency and stability in low-power modes.
  • Please review the changes to ensure they align with the overall project architecture and coding standards.

@CLAassistant
Copy link

CLAassistant commented May 20, 2024

CLA assistant check
All committers have signed the CLA.

@cristidragomir97 cristidragomir97 requested a review from facchinm May 20, 2024 15:19
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels May 20, 2024
@facchinm facchinm force-pushed the main branch 2 times, most recently from 26d868a to 96a0995 Compare May 21, 2024 14:09
@facchinm facchinm merged commit 9f14826 into arduino:main May 21, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants