From 1b0145d104eae23887e3d2bf4acd616215ee9022 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Wed, 29 Jun 2022 15:14:08 -0400 Subject: [PATCH] GD32: ADC workaround (#83) (cherry picked from commit 02fd9f248189e3e801b50c920e1166daa23283bc) Co-authored-by: Andrey Gusakov --- firmware/sampling.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/sampling.cpp b/firmware/sampling.cpp index e2122ee..f52ec84 100644 --- a/firmware/sampling.cpp +++ b/firmware/sampling.cpp @@ -49,6 +49,9 @@ static void SamplingThread(void*) float r_2 = 0; float r_3 = 0; + /* GD32: Insert 20us delay after ADC enable */ + chThdSleepMilliseconds(1); + while(true) { /* TODO: run for all channels */