Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
STM32 reset controller helpers

Macros for encoding STM32 peripheral reset cells. More...

Files

file  stm32-common.h
 STM32 reset controller devicetree common helper macros.
file  stm32c0_reset.h
 STM32 reset controller devicetree helper macros for STM32C0.
file  stm32c5_reset.h
 STM32 reset controller devicetree helper macros for STM32C5.
file  stm32f0_1_3_reset.h
 STM32 reset controller devicetree helper macros for STM32F0/F1/F3.
file  stm32f2_4_7_reset.h
 STM32 reset controller devicetree helper macros for STM32F2/F4/F7.
file  stm32g0_reset.h
 STM32 reset controller devicetree helper macros for STM32G0.
file  stm32g4_l4_5_reset.h
 STM32 reset controller devicetree helper macros for STM32G4/L4/L5.
file  stm32h5_reset.h
 STM32 reset controller devicetree helper macros for STM32H5.
file  stm32h7_reset.h
 STM32 reset controller devicetree helper macros for STM32H7.
file  stm32h7rs_reset.h
 STM32 reset controller devicetree helper macros for STM32H7RS.
file  stm32l0_reset.h
 STM32 reset controller devicetree helper macros for STM32L0.
file  stm32l1_reset.h
 STM32 reset controller devicetree helper macros for STM32L1.
file  stm32mp13_reset.h
 STM32 reset controller devicetree helper macros for STM32MP13.
file  stm32mp1_reset.h
 STM32 reset controller devicetree helper macros for STM32MP1.
file  stm32mp2_reset.h
 STM32 reset controller devicetree helper macros for STM32MP2.
file  stm32n6_reset.h
 STM32 reset controller devicetree helper macros for STM32N6.
file  stm32u0_reset.h
 STM32 reset controller devicetree helper macros for STM32U0.
file  stm32u3_reset.h
 STM32 reset controller devicetree helper macros for STM32U3.
file  stm32u5_reset.h
 STM32 reset controller devicetree helper macros for STM32U5.
file  stm32wb0_reset.h
 STM32 reset controller devicetree helper macros for STM32WB0.
file  stm32wb_l_reset.h
 STM32 reset controller devicetree helper macros for STM32WB/WL.
file  stm32wba_reset.h
 STM32 reset controller devicetree helper macros for STM32WBA.

Macros

#define STM32_RESET(bus, bit)
 Encode a peripheral reset cell value for the st,stm32-rcc-rctl binding.

Detailed Description

Macros for encoding STM32 peripheral reset cells.

Devicetree macro for encoding peripheral reset cells on STM32 devices, for use with the st,stm32-rcc-rctl compatible reset controller.

Each SoC family header (for example stm32h5_reset.h) defines the RCC bus reset register offsets for that family as STM32_RESET_BUS_<bus> constants. A peripheral reset cell is then encoded with STM32_RESET() by combining a bus constant with the bit position of the peripheral's reset line within that bus reset register.

Note
STM32MP1 and STM32MP13 redefine STM32_RESET() with separate SET/CLEAR offsets. STM32MP2 uses per-peripheral registers.
#include <zephyr/dt-bindings/reset/stm32h5_reset.h>
&usart1 {
resets = <&rctl STM32_RESET(APB2, 14)>;
};

Macro Definition Documentation

◆ STM32_RESET

#define STM32_RESET ( bus,
bit )

#include <zephyr/dt-bindings/reset/stm32-common.h>

Value:
(((STM32_RESET_BUS_##bus) << 5U) | (bit))

Encode a peripheral reset cell value for the st,stm32-rcc-rctl binding.

Packs an RCC bus register offset and a bit position into one 32-bit reset cell value.

Bits [4:0] hold the reset bit position within the 32-bit RCC bus register; bits [16:5] hold the RCC register byte offset relative to the RCC base address.

Parameters
busRCC bus name.
bitBit position of the peripheral's reset line within the bus reset register