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

New bug on ESP32-S3 related to deep sleep fix on 8.0.0 Beta 6 #7375

Closed
sas42 opened this issue Dec 23, 2022 · 1 comment
Closed

New bug on ESP32-S3 related to deep sleep fix on 8.0.0 Beta 6 #7375

sas42 opened this issue Dec 23, 2022 · 1 comment
Assignees
Milestone

Comments

@sas42
Copy link

sas42 commented Dec 23, 2022

CircuitPython version

New bug on ESP32-S3 related to deep sleep fix on 8.0.0 Beta 6. When I run the code shown below with the ESP32-S3 Feather NO PSRAM, connected to the USB for Power using MU, all works fine. Light Sleep and Deep Sleep perform as expected. When I run off of Battery Alone, then the feather goes into Light Sleep, followed by Deep Sleep (Both work fine on First Pass). On second and following passes then Light Sleep awakens after about 0.005 seconds and Deep Sleep awakens after 36 Seconds as expected. Somehow Awakening from Deep Sleep seems to interfere with Light Sleep now.

Adafruit CircuitPython 8.0.0-beta.6 on 2022-12-21; Adafruit Feather ESP32S3 No PSRAM with ESP32S3
>>>
When Working
Entering Light sleep for 15 seconds at 4.012
Entering Light sleep for 15 seconds at 21.819
Entering deep sleep for 36 seconds at 36.819
Entering Light sleep for 15 seconds at 4.012
Entering deep sleep for 36 seconds at 19.013

When Not Working
Entering Light sleep for 15 seconds at 2.514
Entering deep sleep for 36 seconds at 2.519
Entering Light sleep for 15 seconds at 2.514
Entering deep sleep for 36 seconds at 2.519
Entering Light sleep for 15 seconds at 2.514

Code/REPL

import digitalio
import board
import alarm
import time

uart = board.UART()
uart.baudrate = 115200

led = digitalio.DigitalInOut(board.LED)
led.switch_to_output(True)
time.sleep(2)
led.value = False
msg = "Alarm was " + str(alarm.wake_alarm) + "\r\n"
print(msg, end="")
# uart.write(msg.encode("utf-8"))

while True:

    time_alarm = alarm.time.TimeAlarm(monotonic_time=time.monotonic() + 15)

    msg = "Entering Light sleep for 15 seconds at " + str(time.monotonic()) + "\r\n"
    print(msg, end="")
    uart.write(msg.encode("utf-8"))
    # local_pin_alarm_command = alarm.pin.PinAlarm(
    #    pin=board.D6, value=False, edge=False, pull=False)
    # alarm.light_sleep_until_alarms(time_alarm, local_pin_alarm_command)
    alarm.light_sleep_until_alarms(time_alarm)
    print("Awoke from light sleep, now deep sleep")

    time_alarm = alarm.time.TimeAlarm(monotonic_time=time.monotonic() + 36)

    msg = "Entering deep sleep for 36 seconds at " + str(time.monotonic()) + "\r\n"
    print(msg, end="")
    uart.write(msg.encode("utf-8"))

    alarm.exit_and_deep_sleep_until_alarms(time_alarm)

Behavior

When I run the code shown below with the ESP32-S3 Feather NO PSRAM, connected to the USB for Power using MU, all works fine. Light Sleep and Deep Sleep perform as expected. When I run off of Battery Alone, then the feather goes into Light Sleep, followed by Deep Sleep (Both work fine on First Pass). On second and following passes then Light Sleep awakens after about 0.005 seconds and Deep Sleep awakens after 36 Seconds as expected. Somehow Awakening from Deep Sleep seems to interfere with Light Sleep now.

Description

Adafruit CircuitPython 8.0.0-beta.6 on 2022-12-21; Adafruit Feather ESP32S3 No PSRAM with ESP32S3

When Working
Entering Light sleep for 15 seconds at 4.012
Entering Light sleep for 15 seconds at 21.819
Entering deep sleep for 36 seconds at 36.819
Entering Light sleep for 15 seconds at 4.012
Entering deep sleep for 36 seconds at 19.013

When Not Working
Entering Light sleep for 15 seconds at 2.514
Entering deep sleep for 36 seconds at 2.519
Entering Light sleep for 15 seconds at 2.514
Entering deep sleep for 36 seconds at 2.519
Entering Light sleep for 15 seconds at 2.514

Additional information

No response

@sas42 sas42 added the bug label Dec 23, 2022
@dhalbert dhalbert added this to the 8.0.0 milestone Dec 30, 2022
@tannewt
Copy link
Member

tannewt commented Jan 11, 2023

Fixed by #7441

@tannewt tannewt closed this as completed Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants