From e3deb33d7ff2c041fc91dc5e4cce2610e928ecc4 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Mon, 3 May 2021 22:09:26 +1000 Subject: [PATCH] Slow down adc and therefore pid to ~128ms --- source/Core/BSP/MHP30/IRQ.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/BSP/MHP30/IRQ.cpp b/source/Core/BSP/MHP30/IRQ.cpp index 1d51922d..82b1c17a 100644 --- a/source/Core/BSP/MHP30/IRQ.cpp +++ b/source/Core/BSP/MHP30/IRQ.cpp @@ -19,7 +19,7 @@ void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc) { BaseType_t xHigherPriorityTaskWoken = pdFALSE; if (hadc == &hadc1) { counter++; - if (counter % 4 == 0) { + if (counter % 64 == 0) { if (pidTaskNotification) { vTaskNotifyGiveFromISR(pidTaskNotification, &xHigherPriorityTaskWoken); portYIELD_FROM_ISR(xHigherPriorityTaskWoken);