diff options
author | alextrical <[email protected]> | 2023-06-30 15:57:11 +0100 |
---|---|---|
committer | alextrical <[email protected]> | 2023-06-30 15:57:11 +0100 |
commit | f81257562d31234ac9355f1afcb46a61af4eacf5 (patch) | |
tree | 1b33d089c4b59152a6cd1d286c3cfa4e9958e033 /source | |
parent | 990f42ad1a75a4de4b59950d313ab709a09959f4 (diff) | |
download | IronOS-f81257562d31234ac9355f1afcb46a61af4eacf5.tar.gz IronOS-f81257562d31234ac9355f1afcb46a61af4eacf5.zip |
Tip short detection at boot
If tip is shorted at boot, prevent the FW from running, with the intent to prevent the MOSFET from being damaged
Diffstat (limited to 'source')
-rw-r--r-- | source/Core/BSP/Pinecilv2/BSP.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/Core/BSP/Pinecilv2/BSP.cpp b/source/Core/BSP/Pinecilv2/BSP.cpp index 28646a18..d49dd653 100644 --- a/source/Core/BSP/Pinecilv2/BSP.cpp +++ b/source/Core/BSP/Pinecilv2/BSP.cpp @@ -206,6 +206,11 @@ void FinishMeasureTipResistance() { uint8_t newRes = 0;
if (reading > 8000) {
// return; // Change nothing as probably disconnected tip
+ } else if (reading < 500) {
+ for (;;) /* Tip shorted, wait until reset */
+ {
+ __NOP();
+ }
} else if (reading < 4000) {
newRes = 62;
} else {
|