rt-thread/bsp
YangZhongQing 1c2d05d545 RTC STM32F1 Enable PWR and BKP clocks in the same time
bsp\stm32\libraries\HAL_Drivers\drv_rtc.c在STM32F10x上有一个“RTC首次上电时BKP时钟没使能”的问题。

STM32F10x要求:
写RTC Domain and RTC registers之前需要__HAL_RCC_BKP_CLK_ENABLE(详见:stm32f1xx_hal_rtc.c里面的##### Backup Domain Access #####)

问题分析:
1、RTC首次上电时:由于HAL_RTC_Init初始化之前没有使能BKP时钟,所以对RTC registers的初始化无效。
2、然后用date命令设置时间,调用到set_rtc_time_stamp也没有__HAL_RCC_BKP_CLK_ENABLE,所以HAL_RTCEx_BKUPWrite写的值无法真正永存于BKP,重启后就丢失。
最终导致:对于RTC首次上电的情况,每次重启后RTC_BKP_DR1里的值都不是BKUP_REG_DATA,导致永远无法调用到rt_rtc_f1_bkp_update()去使能BKP时钟。

解决办法:
参考STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\RTC\Calendar\main.c里面的RTC_Configuration()同时打开RCC_APB1Periph_PWR和RCC_APB1Periph_BKP
2022-09-23 21:04:35 -04:00
..
CME_M7 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
ESP32_C3 ESP32_C3 migrate to ESP-IDF package (#6427) 2022-09-14 03:49:05 -04:00
Vango update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
acm32 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
airm2m update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
allwinner_tina update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
amebaz update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
apm32 [bsp][APM32][APM32F407VGT6] (#6377) 2022-09-06 01:01:03 -04:00
apollo2 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
asm9260t update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
at32 [fal] PKG_USING_FAL -> RT_USING_FAL 2022-08-22 09:42:35 +08:00
at91 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
avr32uc3b0 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
beaglebone bsp beaglebone: add IAR support (#6443) 2022-09-22 14:13:34 +08:00
bf533 add RT_USING_POSIX_STDIO 2022-01-05 23:11:58 +08:00
bluetrum Add annotations 2022-09-06 14:28:45 -04:00
bm3803 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
ck802 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
cypress Cypress-Modify configuration 2022-08-31 14:15:17 +08:00
dm365 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
efm32 [Scons] 将GCC判断条件改为列表方式,方便后续增加新的编译工具链 2022-06-09 07:01:59 +08:00
essemi [rtduino] remove libraries dependencies 2022-08-22 09:45:45 +08:00
fm33lc026 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
frdm-k64f update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
ft32 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
ft2004 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
fujitsu/mb9x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
gd32 使用 __ARMCC_VERSION 代替 __CC_ARM 用以支持AC6编译 (#6436) 2022-09-16 08:13:40 -04:00
gd32e230k-start update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
gd32vf103v-eval update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
gd32105c-eval update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
gd32107c-eval update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
gd32303e-eval update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
gd32350r-eval update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
gd32450z-eval update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
hc32 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
hc32l136 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
hc32l196 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
hifive1 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
hk32 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
hpmicro Add BSP for HPM6750EVK and HPM6750EVKMINI (#6374) 2022-09-06 00:48:16 -04:00
imx6sx update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
imx6ul update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
imxrt [imxrt1170-m7]Adjust pro dir structure (#6446) 2022-09-19 01:20:02 -04:00
juicevm update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
k210 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lm3s9b9x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lm3s8962 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lm4f232 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
loongson update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc43xx update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc55sxx update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc176x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc178x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc408x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc824 [scons][iar] 将IAR的PLATFORM字段由iar调整为iccarm 2022-06-09 07:01:59 +08:00
lpc1114 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc2148 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc2478 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc5410x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc54114-lite update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
lpc54608-LPCXpresso update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
m16c62p [scons][iar] 将IAR的PLATFORM字段由iar调整为iccarm 2022-06-09 07:01:59 +08:00
maxim [bsp/maxium/max3660]Update README.md (#6323) 2022-08-22 13:44:25 -04:00
microblaze add RT_USING_POSIX_STDIO 2022-01-05 23:11:58 +08:00
microchip update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
mini2440 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
mini4020 [update] move dfs_posix.h to legacy/dfs/dfs_posix.h 2022-01-14 23:09:32 +08:00
mipssim update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
mm32 补充开发板资料说明 2022-09-02 10:04:47 +08:00
mm32f103x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
mm32f327x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
mm32l3xx update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
mm32l07x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
n32 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
n32g452xx [n32g45x] bsp 完善can驱动中断处理 (#6313) 2022-08-20 12:21:51 -04:00
nios_ii add RT_USING_POSIX_STDIO 2022-01-05 23:11:58 +08:00
nrf5x [bsp][nrf52840]Add segger rtt function (#6460) 2022-09-23 09:38:42 -04:00
nuclei update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
nuvoton [bsp/nuvoton] Support NuMaker-IoT-M467 board (#6448) 2022-09-20 10:30:21 -04:00
nv32f100x [scons][iar] 将IAR的PLATFORM字段由iar调整为iccarm 2022-06-09 07:01:59 +08:00
pic32ethernet add RT_USING_POSIX_STDIO 2022-01-05 23:11:58 +08:00
qemu-vexpress-a9 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
qemu-vexpress-gemini update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
qemu-virt64-aarch64 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
qemu-virt64-riscv update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
raspberry-pi update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
raspberry-pico update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
renesas [annotation] renesas默认使用串口V2标准 (#6391) 2022-09-07 21:05:17 -04:00
rm48x50 [scons][iar] 将IAR的PLATFORM字段由iar调整为iccarm 2022-06-09 07:01:59 +08:00
rockchip update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
rv32m1_vega update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
rx 修改bsp的usb host 驅動 (#4379) 2022-01-26 10:46:57 +08:00
sam7x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
samd21 [Scons][iar][iccarm] IAR统一使用iccarm作为判断条件而不是是用IDE的名字来进行判断 2022-06-09 07:01:59 +08:00
sep6200 add RT_USING_POSIX_STDIO 2022-01-05 23:11:58 +08:00
simulator [fix] Fix simulator compilation warnings (#6438) 2022-09-20 10:31:11 -04:00
smartfusion2 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
sparkfun-redv update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
stm32 RTC STM32F1 Enable PWR and BKP clocks in the same time 2022-09-23 21:04:35 -04:00
synopsys/boards update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
synwit 将swm320和swm341整合进synwit (#6290) 2022-08-16 12:43:24 -04:00
tae32f5300 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
taihu add RT_USING_POSIX_STDIO 2022-01-05 23:11:58 +08:00
thead-smart update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
tkm32F499 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
tm4c123bsp update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
tm4c129x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
tms320c6678 add new bsp tms320c6678 2022-01-29 16:11:42 +08:00
tms320f28379d tms320f28379d fix init (#6343) 2022-08-29 15:35:23 -04:00
upd70f3454 [scons][iar] 将IAR的PLATFORM字段由iar调整为iccarm 2022-06-09 07:01:59 +08:00
w60x update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
wch 添加了 rtc 驱动 2022-09-22 23:25:27 -04:00
wh44b0
x86 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
xplorer4330 update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
yichip/yc3121-pos update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
zynqmp-r5-axu4ev update the project for RT-Thread_V4.1.1 2022-08-16 19:38:48 +08:00
Copyright_Notice.md 本次PR涉及①BSP驱动新增②F103库更新③GCC、IAR适配及MDK更新④README文件及由更新驱动引起的脚本改动。 (#5638) 2022-03-08 12:03:06 +08:00