Quantcast
Viewing all articles
Browse latest Browse all 4856

SDK • Re: core used for hardware alarms

Use alarm_pool_t *alarm_pool_create(uint max_timers, uint hardware_alarm _num) or alarm_pool_t *alarm_pool_create_with_unused_hardware_alarm(uint max_timers) from core 1 to create your own alarm pool, and pass that to the function variants which take the alarm_pool

you can set PICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1 in your compiler definitions to disable the default alarm pool. there is currently no way to replace the default alarm pol
I started implementation to do CMAKE dependant optiond for PICO_TIME_DEFAULT_ALARM_POOL_DISABLED, so my code can have his own alarm pool initializer being called from CORE1.
I could not find much examples of alarm_pool_create usage in pico-sdk or in www, so I tried to make the same flow as in the original code disabled from the SDK, but my problem resides in the static function alarm_pool_alarm_callback on the original code, should I copy this 100%?

Also when disabling the default timer on the sdk I saw some objects that they appear to waste memory, since they are unused, like

Code:

static alarm_pool_t *pools[NUM_TIMERS];

Statistics: Posted by mlorenzati — Sun Feb 25, 2024 6:51 pm



Viewing all articles
Browse latest Browse all 4856

Trending Articles