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

SAM0 will wake up with interrupted execution after deep sleep #29733

Closed
alfonsotames opened this issue Nov 2, 2020 · 7 comments
Closed

SAM0 will wake up with interrupted execution after deep sleep #29733

alfonsotames opened this issue Nov 2, 2020 · 7 comments
Labels
bug The issue is a bug, or the PR is fixing a bug platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) priority: low Low impact/importance bug Stale

Comments

@alfonsotames
Copy link

Trying to wake up the SAM0 after a deep sleep will froze execution. The interrupt will still work but any execution will advance step by step as the interrupt is invoked. I am using an ATSAMD21G18A board.

To Reproduce

  1. Clone the deep sleep demo project
  2. Configure LED0 and SW0 in your SAM0 dts board file.
  3. Build & flash

Expected behavior
Pressing SW0 should should wake up SAM0 and blink LED0 5 times, then go to deep sleep again.

Impact
SAM0 cannot properly wake up from deep sleep.

Environment:

  • OS: zephyr-v2.4.0-1111-g8941f9a00c0b
  • Output log to console
@alfonsotames alfonsotames added the bug The issue is a bug, or the PR is fixing a bug label Nov 2, 2020
@MaureenHelm MaureenHelm added the platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) label Nov 3, 2020
@MaureenHelm
Copy link
Member

@nandojve can you take a look at this?

@MaureenHelm MaureenHelm added the priority: low Low impact/importance bug label Nov 3, 2020
@nandojve
Copy link
Member

nandojve commented Nov 5, 2020

Hi @MaureenHelm , I talked with @Beirdo and he will look at.
Thanks!

@github-actions
Copy link

github-actions bot commented Jan 4, 2021

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@sslupsky
Copy link
Contributor

@alfonsotames Yeah, this issue is because the tickless timer is broken for sam0. I fixed it a while ago and posted a PR for rtc_timer.c here but after two subsequent releases I gave up trying to get it into the tree because it was ignored. Are you still using sam0? There are other issues as well with the clocks, i2c and the uart drivers.

@alfonsotames
Copy link
Author

Thanks for your comment! No, I stopped using SAM0 since it's pointless without a proper wake up. I switched to STM32L432KC and everything looks good so far.

@sslupsky
Copy link
Contributor

It is possible to do (I have done so) but for what ever reason the zephyr team has not addressed the underlying issues.

@nandojve
Copy link
Member

Hi @sslupsky ,

It is possible to do (I have done so) but for what ever reason the zephyr team has not addressed the underlying issues.

I think SAM0 doesn't have an active codeowner and that make things slow.

If you have this ready, please, rebase and resent. Link you PR with this Issue and let fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) priority: low Low impact/importance bug Stale
Projects
None yet
Development

No branches or pull requests

4 participants