From 7cc95be90028e4565e0107b8869d973b501410ed Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 20 Jul 2023 17:12:50 +0200 Subject: [PATCH 1/2] RAD sensor delay after pulling pin high --- mission/payload/RadiationSensorHandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mission/payload/RadiationSensorHandler.cpp b/mission/payload/RadiationSensorHandler.cpp index 2a87e730..2087ad30 100644 --- a/mission/payload/RadiationSensorHandler.cpp +++ b/mission/payload/RadiationSensorHandler.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -93,6 +94,10 @@ ReturnValue_t RadiationSensorHandler::buildCommandFromCommand(DeviceCommandId_t } case (radSens::START_CONVERSION): { ReturnValue_t result = gpioIF->pullHigh(gpioIds::ENABLE_RADFET); + // Test a small delay between pulling the RADFET high and reading the sensor. As long as this + // delay remains small enough, this should not cause scheduling issues. Do not make this + // delay large, this device might be scheduled inside the ACS PST! + TaskFactory::delayTask(5); if (result != returnvalue::OK) { #if OBSW_VERBOSE_LEVEL >= 1 sif::warning From 880c09c51024fa2bdf92c46175ea50b8154f05db Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 20 Jul 2023 17:16:14 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5e65685..46e3bfc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ will consitute of a breaking change warranting a new major release: ## Added +- 5 ms delay after pulling RADFET enable pin high before starting + the ADC conversion. - Set STR time in configuration sequence to firmware mode. - The STR `AutoThreshold` parameters are now set from the configuration JSON file at STR startup.