- static void timerTask(void *userData) {
- TimerManager *timerManager = (TimerManager *)userData;
- uint32_t notifiedValue;
- uint64_t rawValue;
- while (1) {
- showMyStack("timerTask");
- ESP_LOGI(TAG,"timerTask waiting...");
- // RTOS Task to sleep until timer pops. xTaskGenericNotifyWait(uxIndexToWaitOn, ulBitsToClearOnEntry, ulBitsToClearOnExit, pulNotificationValue, xTicksToWait), bits_exit_clear, value, wait_time)
- xTaskNotifyWaitIndexed( 0, 0x00, ULONG_MAX, ¬ifiedValue, portMAX_DELAY );
- // Timer popped , notify calling task.
- ESP_LOGI(TAG,"timerTask triggered...");
- gptimer_get_raw_count(gptimer, &rawValue);
- //ESP_LOGI(TAG, "Raw: %llu",rawValue);
- xTaskNotifyGive(timerManager->getCurrentTask()->waitingTask);
- taskListManager->deleteTask(timerManager->getCurrentTask()->waitingTask);
- timerManager->clearCurrentTask();
- timerManager->scheduleTasks();
- }
- }
Backtrace: 0x4008e931:0x3ffd71a0 0x401ae52f:0x3ffd71c0 0x400ddf15:0x3ffd71e0 0x4008cdc1:0x3ffd7210
0x4008e931: timer_ll_trigger_soft_capture at /Users/concunningham/Documents/ESPIDF/esp-idf-v5.1.2/components/hal/esp32/include/hal/timer_ll.h:140
(inlined by) timer_hal_capture_and_get_counter_value at /Users/concunningham/Documents/ESPIDF/esp-idf-v5.1.2/components/hal/timer_hal.c:60
0x401ae52f: gptimer_get_raw_count at /Users/concunningham/Documents/ESPIDF/esp-idf-v5.1.2/components/driver/gptimer/gptimer.c:199
0x400ddf15: timerTask(void*) at /Users/concunningham/Documents/git-repos/PharmaSlave/PSMonitor/main/Utilities/TimerManager.cpp:75
0x4008cdc1: vPortTaskWrapper at /Users/concunningham/Documents/ESPIDF/esp-idf-v5.1.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162