mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
cpu/stm32: add stm32mp1_eng_mode pseudomodule
In Engineering mode (BOOT0 off and BOOT2 on), only the Cortex-M4 core is running. It means that all clocks have to be setup by the Cortex-M4 core. In other modes, the clocks are setup by the Cortex-A7 and then should not be setup by Cortex-M4. stm32mp1_eng_mode pseudomodule have to be used in Engineering mode to ensure clocks configuration with IS_USED(MODULE_STM32MP1_ENG_MODE) macro. This macro can also be used in periph_conf.h to define clock source for each peripheral. Signed-off-by: Gilles DOFFE <gilles.doffe@savoirfairelinux.com>
This commit is contained in:
parent
3008574d0e
commit
4bfbb75578
@ -161,8 +161,10 @@ void cpu_init(void)
|
||||
defined(CPU_FAM_STM32L1)
|
||||
_gpio_init_ain();
|
||||
#endif
|
||||
#if !defined(CPU_FAM_STM32MP1) || IS_USED(MODULE_STM32MP1_ENG_MODE)
|
||||
/* initialize the system clock as configured in the periph_conf.h */
|
||||
stmclk_init_sysclk();
|
||||
#endif
|
||||
#ifdef MODULE_PERIPH_DMA
|
||||
/* initialize DMA streams */
|
||||
dma_init();
|
||||
|
@ -146,7 +146,9 @@ void pm_set(unsigned mode)
|
||||
|
||||
if (deep) {
|
||||
/* Re-init clock after STOP */
|
||||
#if !defined(CPU_FAM_STM32MP1) || IS_USED(MODULE_STM32MP1_ENG_MODE)
|
||||
stmclk_init_sysclk();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,12 @@ else ifneq (,$(filter $(CPU_FAM),l5))
|
||||
else ifneq (,$(filter $(CPU_FAM),g0 g4))
|
||||
SRC += stmclk_gx.c
|
||||
else ifneq (,$(filter $(CPU_FAM),mp1))
|
||||
SRC = stmclk_mp1.c
|
||||
ifneq (,$(filter stm32mp1_eng_mode,$(USEMODULE)))
|
||||
SRC = stmclk_mp1.c
|
||||
else
|
||||
# Do not use *.c as SRC if SRC is empty (see Makefile.base)
|
||||
NO_AUTO_SRC = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -125,6 +125,7 @@ PSEUDOMODULES += stdio_uart_rx
|
||||
PSEUDOMODULES += stm32_eth
|
||||
PSEUDOMODULES += stm32_eth_auto
|
||||
PSEUDOMODULES += stm32_eth_link_up
|
||||
PSEUDOMODULES += stm32mp1_eng_mode
|
||||
PSEUDOMODULES += suit_transport_%
|
||||
PSEUDOMODULES += suit_storage_%
|
||||
PSEUDOMODULES += wakaama_objects_%
|
||||
|
Loading…
Reference in New Issue
Block a user