やったことメモ:
RP2040向けの、RTCから時刻を取得するコードを
https://github.com/adafruit/circuitpython/blob/main/lib/mbedtls_config/mbedtls_port.c#L50
RP2350の場合はpowmanを使って取得するようにしてみた
#ifdef PICO_RP2350
#include "hardware/powman.h"
time_t rp2_rtctime_seconds(time_t *timer) {
return powman_timer_get_ms() / 1000ULL;
}
#endif
が、CircuitPython側でRuntimeError: pystack exhaustedで死ぬので、たぶんまだなんかおかしい
powman_timer_get_ms() / 1000ULLで本当に秒が返せるかのテストコードが必要なので、ちゃんとやるかあ