1
0
mirror of https://github.com/raspberrypi/pico-sdk.git synced 2025-08-06 06:02:39 +03:00

13 Commits

Author SHA1 Message Date
Graham Sanderson
4242010f11 Misc cleanup (#2569)
* miscellaneous cleanup:

* cleanup some #ifdefs which were slightly hacky when RP2350 was added; use HAS_ flags in preference to PICO_RP2040/RP2350
* make some dependencies more explicit - i.e. compile if the user doesn't want to include certain libraries
* cleanup some directory A -> directory B relative path names in CMakeLists.txt to be SDK root -> directory B
2025-07-18 09:37:21 -05:00
Peter Harper
f674850f0e Fix DST bug in aon_timer_get_time for rp2040 (#2409)
If you set the timezone, aon_timer_get_time can wrongly apply a
daylight saving time adjustment based on the stack contents. This can
make it appear that time has gone backwards.

Make sure datetime_to_tm initialises tm_isdst to -1.

Fixes #2374
2025-04-11 09:14:26 -07:00
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