Skip to content

Commit 908d940

Browse files
committed
soc: st: stm32U5/L5 series also have SWO line
Add the SWO trace output to the stm32H5/H7RS/L5/U5/WB series Signed-off-by: Francois Ramu <[email protected]>
1 parent dfbcea7 commit 908d940

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

soc/st/stm32/common/soc_config.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ static int st_stm32_common_config(void)
2828
{
2929
#ifdef CONFIG_LOG_BACKEND_SWO
3030
/* Enable SWO trace asynchronous mode */
31-
#if defined(CONFIG_SOC_SERIES_STM32WBX) || defined(CONFIG_SOC_SERIES_STM32H5X)
31+
#if defined(CONFIG_SOC_SERIES_STM32H5X) || defined(CONFIG_SOC_SERIES_STM32H7RSX) || \
32+
defined(CONFIG_SOC_SERIES_STM32L5X) || defined(CONFIG_SOC_SERIES_STM32U5X) || \
33+
defined(CONFIG_SOC_SERIES_STM32WBX)
3234
LL_DBGMCU_EnableTraceClock();
3335
#endif
3436
#if !defined(CONFIG_SOC_SERIES_STM32WBX) && defined(DBGMCU_CR_TRACE_IOEN)
3537
LL_DBGMCU_SetTracePinAssignment(LL_DBGMCU_TRACE_ASYNCH);
3638
#endif
3739
#endif /* CONFIG_LOG_BACKEND_SWO */
3840

39-
4041
#if defined(CONFIG_USE_SEGGER_RTT)
4142
/* On some STM32 boards, for unclear reason,
4243
* RTT feature is working with realtime update only when
@@ -49,7 +50,6 @@ static int st_stm32_common_config(void)
4950
__HAL_RCC_GPDMA1_CLK_ENABLE();
5051
#endif /* __HAL_RCC_DMA1_CLK_ENABLE */
5152

52-
5353
#endif /* CONFIG_USE_SEGGER_RTT */
5454

5555
/* On some STM32 boards, for unclear reason,

soc/st/stm32/stm32l5x/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ config SOC_SERIES_STM32L5X
1313
select ARMV8_M_DSP
1414
select CPU_CORTEX_M_HAS_DWT
1515
select HAS_STM32CUBE
16+
select HAS_SWO
1617
select HAS_PM
1718
select SOC_EARLY_INIT_HOOK

soc/st/stm32/stm32u5x/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ config SOC_SERIES_STM32U5X
1616
select CPU_CORTEX_M_HAS_DWT
1717
select HAS_STM32CUBE
1818
select HAS_PM
19+
select HAS_SWO
1920
select HAS_POWEROFF
2021
select SOC_EARLY_INIT_HOOK
2122

0 commit comments

Comments
 (0)