From 3f35a6928a0ca9fd1dc999d01a6fcaf7fd42da9e Mon Sep 17 00:00:00 2001 From: Daniel Koepping Date: Sat, 28 Nov 2026 11:50:18 -0600 Subject: [PATCH] check comma four id strap (#2513) --- panda/board/stm32h7/board.h | 3 ++- panda/board/stm32h7/stm32h7_config.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/panda/board/stm32h7/board.h b/panda/board/stm32h7/board.h index 86491b4ff3..a09c16814a 100644 --- a/panda/board/stm32h7/board.h +++ b/panda/board/stm32h7/board.h @@ -35,7 +35,8 @@ void detect_board_type(void) { if (id2 == 3U) { hw_type = HW_TYPE_CUATRO; current_board = &board_cuatro; - } else if (id1 == 0U) { + } else if ((get_package_smps_type() == PACKAGE_WITH_SMPS) && (id1 == 0U)) { + // id1 also reads 0 on cuatro, the package tells them apart hw_type = HW_TYPE_RED_PANDA; current_board = &board_red; } else if (id1 == 1U) { diff --git a/panda/board/stm32h7/stm32h7_config.h b/panda/board/stm32h7/stm32h7_config.h index 6da06d8938..e72fc20605 100644 --- a/panda/board/stm32h7/stm32h7_config.h +++ b/panda/board/stm32h7/stm32h7_config.h @@ -72,12 +72,12 @@ separate IRQs for RX and TX. #include "board/stm32h7/llmpu.h" #endif +#include "board/stm32h7/clock.h" #ifdef PANDA_BODY #include "board/body/stm32h7/board.h" #else #include "board/stm32h7/board.h" #endif -#include "board/stm32h7/clock.h" #ifdef BOOTSTUB #include "board/stm32h7/llflash.h"