11 Commits

Author SHA1 Message Date
Peter Harper
7dfbb3c958
Add a delay after rtc_set_datetime (#2156)
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
2025-02-06 09:24:30 -06:00
Graham Sanderson
9f95a46e31
fix pico_time_test.c compile on native (#2207) 2025-01-29 09:13:51 -06:00
Peter Harper
b8dc8c488d
Fix ta_wakes_up_on_or_before (#2190)
* Fix ta_wakes_up_on_or_before

Handle target in the past and running for > 2^32 us.

Fixes #2186

* Add test for ta_wakes_up_on_or_before fix
2025-01-20 10:56:23 -06:00
Peter Harper
969f5895aa
ta_set_timeout can fail to set an alarm (#2127)
* ta_set_timeout can fail to set an alarm

If alarm_pool_irq_handler takes <1us between handling an alarm and
calling ta_set_timeout then no alarms will be set as it will appear as
if an earlier alarm is already armedi before the target time.

Make sure ta_set_timeout always leaves with an alarm set by checking the
armed status.

Fixes #2118

* ta_disable_irq_handler should unarm its timer
2024-12-06 10:39:04 -06:00
Peter Harper
d649c6c77a
Add some tests (#1978)
* Test for best_effort_wfe_or_timeout sev issue

best_effort_wfe_or_timeout should not ignore an outstanding sev
See https://github.com/raspberrypi/pico-sdk/issues/1812

* Test for alarm being set in the past issue

See https://github.com/raspberrypi/pico-sdk/issues/1953
2024-11-05 17:27:19 +00:00
Andrew Scheller
7d5d9276a8
Workaround gcc/newlib issue on Ubuntu 24 (#1863) 2024-08-23 10:59:36 -05:00
graham sanderson
efe2103f9b SDK 2.0.0 release 2024-08-08 08:54:38 -05:00
Graham Sanderson
605e21ae6f
pairing heap free link list gets orphaned when fully depleted (#1120) (#1121)
add some more asserts, and fix test case for debug which was broken by all the assserts slowing it down
2022-12-08 11:14:53 -06:00
Graham Sanderson
d36b1ca8ae
hardware_timer: fix race condition whem a new timer being added becomes missed thus obviating the need for an IRQ but there is an IRQ already pending for another timer (#243) 2021-03-10 12:04:04 -06:00
graham sanderson
684986aae6 fix the represntation of at_the_end_of_time to be 63 one bits rather than 32 2021-03-04 21:22:48 -06:00
graham sanderson
26653ea81e Initial Release 2021-01-20 10:44:27 -06:00