From e58ab6d7132dfd554443e486c7e30bf2bef4a0ea Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Tue, 18 Jun 2024 09:18:23 +0200 Subject: [PATCH] soc: stm32: config DBGMCU register writing for SWO configuration Some stm32 series, do not have a LL_DBGMCU_SetTracePinAssignment function to enable trace IO port, this is the case with the stm32h7 serie. Signed-off-by: Francois Ramu --- soc/st/stm32/common/soc_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soc/st/stm32/common/soc_config.c b/soc/st/stm32/common/soc_config.c index 70f270cf494..6e5650850b4 100644 --- a/soc/st/stm32/common/soc_config.c +++ b/soc/st/stm32/common/soc_config.c @@ -30,7 +30,7 @@ static int st_stm32_common_config(void) #if defined(CONFIG_SOC_SERIES_STM32WBX) || defined(CONFIG_SOC_SERIES_STM32H5X) LL_DBGMCU_EnableTraceClock(); #endif -#if !defined(CONFIG_SOC_SERIES_STM32WBX) +#if !defined(CONFIG_SOC_SERIES_STM32WBX) && defined(DBGMCU_CR_TRACE_IOEN) LL_DBGMCU_SetTracePinAssignment(LL_DBGMCU_TRACE_ASYNCH); #endif #endif /* CONFIG_LOG_BACKEND_SWO */