From 2fab502cad444ebabea51e0e0df447b4bbd45a21 Mon Sep 17 00:00:00 2001 From: robbederks Date: Thu, 2 Jul 2020 23:07:27 +0200 Subject: [PATCH] Increased pullup delay significantly to maybe improve board detection stability. 10 loops was only tens of ns. (#567) --- board/boards/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/boards/common.h b/board/boards/common.h index d0a4908..73addfe 100644 --- a/board/boards/common.h +++ b/board/boards/common.h @@ -73,7 +73,7 @@ void peripherals_init(void){ } // Detection with internal pullup -#define PULL_EFFECTIVE_DELAY 10 +#define PULL_EFFECTIVE_DELAY 4096 bool detect_with_pull(GPIO_TypeDef *GPIO, int pin, int mode) { set_gpio_mode(GPIO, pin, MODE_INPUT); set_gpio_pullup(GPIO, pin, mode);