soc: arm: st: set SWO reference frequency based on 'rcc'
Configure SWO reference frequency to be the same as CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC. This should make all ST boards ready to be used with SWO, without configuring any other devicetree property. Tested with NUCLEO-L476RG and NUCLEO-H563ZI. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit is contained in:
parent
a9fbcd2785
commit
f15e7c5909
1 changed files with 7 additions and 0 deletions
|
@ -16,6 +16,13 @@ DT_STM32_RCC_CLOCK_FREQ := $(dt_node_int_prop_int,$(DT_STM32_RCC_PATH),clock-fre
|
|||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default "$(DT_STM32_RCC_CLOCK_FREQ)" if "$(dt_nodelabel_enabled,rcc)"
|
||||
|
||||
if LOG_BACKEND_SWO
|
||||
|
||||
config LOG_BACKEND_SWO_REF_FREQ_HZ
|
||||
default "$(DT_STM32_RCC_CLOCK_FREQ)" if "$(dt_nodelabel_enabled,rcc)"
|
||||
|
||||
endif # LOG_BACKEND_SWO
|
||||
|
||||
# set the tick per sec as a divider of the LPTIM clock source
|
||||
config SYS_CLOCK_TICKS_PER_SEC
|
||||
default 4096 if STM32_LPTIM_TIMER && STM32_LPTIM_CLOCK_LSE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue