#oh maybe it's possible actually, let me
1 messages Β· Page 1 of 1 (latest)
Thanks, I am using this board
https://circuitpython.org/board/seeed_xiao_esp32c3/
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 π
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
it's hapening here: https://github.com/Neradoc/circuitpython/actions/runs/14296967618
Oh, it's you who replied to my comment yesterday! Thank you! :DD
right, I was wondering
well then the issue is that line:
https://github.com/adafruit/circuitpython/blob/ad73d0bc8eea469c852f4f088931d8bbb6c49e7a/ports/espressif/mpconfigport.mk#L287
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?
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
the build succeeded https://github.com/Neradoc/circuitpython/actions/runs/14296967618
you can get the zip and install it with esptool and see if alarm is enabled and works
thats fine with me, I am not using bluetooth stack in my application
Ok, I will try that and get back to you. Thanks a lot, really!
you can make custom builds like that by creating a fork in github and going to that page (in your fork) https://github.com/Neradoc/circuitpython/actions/workflows/build-board-custom.yml and click "Run workflow" with CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT=0 CIRCUITPY_BLEIO=0 CIRCUITPY_ALARM=1 in the flags field
(the reason for no BLE is https://github.com/adafruit/circuitpython/issues/10002)
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
yep I was just testing deep sleep and it looked good
You are a goat π really, thank you! I'd definitely lose some hairs trying to get it to work tomorrow π
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 π
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
I will check with other pins if they have the same issue