Commit graph

3 commits

Author SHA1 Message Date
Guillaume Gautier b0e1e9f5fb drivers: bbram: stm32: add include to fix compilation error
Driver BBRAM for STM32 had a compilation error: "unknown type name
'RTC_TypeDef'" due to missing include file.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-02-14 10:40:00 +01:00
Adrien Bruant 176d433b98 drivers: bbram: stm32-bbram: port to stm32wl
On STM32WL, the backup memory is defined as part of the TAMP peripheral.
This seems to be a deviation from the stm32 family where this memory is
defined as part of the RTC.

The STM32WL reference manual shows that tamp_pclk is connected to
rtc_pclk. This means that the clock required to run the TAMP peripheral
is the same as the RTC's. A quick port of BBRAM on STM32WL is achieved
by instanciating the bbram device as a child of the RTC and by modifying
the address offset to the first backup register from the rtc base
address.

Signed-off-by: Adrien Bruant <adrien.bruant@aalberts-hfc.com>
2023-11-21 08:40:51 +00:00
Patryk Duda e02456a52d drivers: bbram: Introduce STM32 BBRAM driver
STM32 battery-backed RAM is organized in 4 byte registers. Number of
registers can vary between models from 5 to 32 registers.

Usually, the registers are part of RTC. On some variants they are part
of tamper module. On STM32F1 the registers are in separate module. For
now, only backup registers from RTC are supported.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-08 16:47:09 +09:00