#oh maybe it's possible actually, let me

1 messages Β· Page 1 of 1 (latest)

opaque oak
#

I am not afraid of building the firmware myself, but maybe I'd need some directions how to do it

#

I mean what to change πŸ˜„

river torrent
#

I'm trying a custom build with the flags:

CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT=0
CIRCUITPY_BLEIO=0
CIRCUITPY_ALARM=1

it might not fit though, which means something else should be disabled, we'll see

opaque oak
#

Oh, it's you who replied to my comment yesterday! Thank you! :DD

river torrent
#

right, I was wondering

opaque oak
#

I see, I read that part

In the board port definition file, it mentions the legacy 4MB layout, that is why alarm is omitted yes?

river torrent
#

yeah, supposedly because it doesn't fit on C3 boards, but the fact that it's enabled on Extensa makes me wonder if there's something else

#

setting CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT to 0 should skip that section, and enable compiling with CIRCUITPY_ALARM=1 but BLE has to be disabled

#

you can get the zip and install it with esptool and see if alarm is enabled and works

opaque oak
#

Ok, I will try that and get back to you. Thanks a lot, really!

river torrent
opaque oak
#

I confirm that the custom firmware flashed successfully, and it contains the alarm module.

I have created a basic test scenario that goes uses both light and deep sleep, both seem to work fine

river torrent
#

yep I was just testing deep sleep and it looked good

opaque oak
#

You are a goat πŸ˜„ really, thank you! I'd definitely lose some hairs trying to get it to work tomorrow πŸ˜„

river torrent
#

the thing with deep sleep is to make sure it doesn't kick in before you have time to stop it when you want to edit your code πŸ˜›

opaque oak
#

I have tested the alarm module functionality on the CirPy custom build provided by you a bit this week and I am coming to the conclusion that the preserve_dio functionality of alarm.exit_and_deep_sleep_until_alarms does not work.

My test code.py:

import board
import digitalio
import time

import alarm

d10_pin = digitalio.DigitalInOut(board.D10)
d10_pin.switch_to_output(False)
print("D10 set to output LOW\nThe app will deep-sleep in 10 seconds")
time.sleep(10)
print("Bye")
time_alarm = alarm.time.TimeAlarm(monotonic_time=time.monotonic() + 5)
alarm.exit_and_deep_sleep_until_alarms(time_alarm, preserve_dios=[d10_pin])

Initially the D10 pin goes to 3.3V, then 0 V, but then goes to high impedance >1 MOhm upon entering the deep sleep. Do you know if it is a known issue for ESP32C3, or should I create an issue for that?
This might be related but I am not sure: https://github.com/adafruit/circuitpython/issues/9622

GitHub

CircuitPython version Adafruit CircuitPython 9.1.1 on 2024-07-23; Waveshare ESP32-S3-Zero with ESP32S3 Adafruit CircuitPython 9.1.3 on 2024-08-30; Waveshare ESP32-S3-Zero with ESP32S3 Adafruit Circ...

#

I will check with other pins if they have the same issue