RT-Thread中AT32F403A使用RTC

[复制链接]
1337|3
手机看帖
扫描二维码
随时随地手机跟帖
cookie2g|  楼主 | 2021-1-20 14:52 | 显示全部楼层 |阅读模式
RT-Thread Studio中开启RTC,根据官方说明(基于STM32),只要三步:搜索
复制

/** if you want to use rtc(hardware) you can use the following instructions.
*
* STEP 1, open rtc driver framework(hardware) support in the RT-Thread Settings file
*
* STEP 2, define macro related to the rtc
*                 such as    BSP_USING_ONCHIP_RTC
*
* STEP 3, modify your stm32xxxx_hal_config.h file to support rtc peripherals. define macro related to the peripherals
*                 such as     #define HAL_RTC_MODULE_ENABLED


但是第三步,需要在hal_config.h文件中修改,而AT32用的是STD库,没有这个文件,需要在哪里进行修改?

使用特权

评论回复
发呆二极管| | 2021-1-20 15:36 | 显示全部楼层
印象中RTT本身就是支持AT32的,是可能没有相关例程吗?

使用特权

评论回复
sheltonyu| | 2021-1-20 16:01 | 显示全部楼层
RT-Thread Studio中添加AT32 RTC,在RT-Thread Settings中RTC配置好后,只需要在board.h中定义宏BSP_USING_RTC即可,没有第三步配置。

使用特权

评论回复
zhengshuai888| | 2021-1-21 08:06 | 显示全部楼层
学习了,感谢楼主分享。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

5

帖子

0

粉丝