mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-08-07 17:02:52 +03:00
If you call rtc_get_datetime immediately after rtc_set_datetime you get junk back. According to the datasheet "Writing to the RTC will take 2 clk_rtc clock periods to arrive". So add a delay after calling rtc_set_datetime in aon_timer_set_time_calendar. Fixes #2148
11 lines
416 B
CMake
11 lines
416 B
CMake
if (NOT PICO_TIME_NO_ALARM_SUPPORT)
|
|
add_executable(pico_time_test pico_time_test.c)
|
|
target_compile_definitions(pico_time_test PRIVATE
|
|
PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS=250
|
|
)
|
|
target_link_libraries(pico_time_test PRIVATE pico_test)
|
|
if (PICO_RP2040)
|
|
target_link_libraries(pico_time_test PRIVATE pico_aon_timer)
|
|
endif()
|
|
pico_add_extra_outputs(pico_time_test)
|
|
endif() |