[bsp/stm32/stm32h743-atk-apollo]support stm32h7 fal

This commit is contained in:
whj4674672 committed 2020-05-20 13:40:33 +08:00
1 parent 2cbb9c5388
commit b91f1ab54e
4 files changed
+356

No files matched your search

File diff suppressed because it is too large. Load diff
+2
View File
@@ -60,6 +60,7 @@
| USB Device | 暂不支持 | |
| USB Host | 暂不支持 | |
| IWG | 支持 | |
| FLASH | 支持 | 已适配 [FAL](https://github.com/RT-Thread-packages/fal) |
## 使用说明
@@ -118,6 +119,7 @@ msh >
## 注意事项
1. 使用UART2 DMA模式时,HEAP的CACHE策略设置了WT模式,所以在使用rt_device_read读取数据之前必须调用用SCB_InvalidateDCache_by_Addr或者SCB_InvalidateDCache,已确保读取到数据的正确性。
2. 使用FAL操作片内FLASH,每次读写必须是32字节的整数倍。
## 联系人信息
@@ -110,6 +110,10 @@ menu "On-chip Peripheral Drivers"
default 117
endif
config BSP_USING_ON_CHIP_FLASH
bool "Enable on-chip FLASH"
default n
menuconfig BSP_USING_ONCHIP_RTC
bool "Enable RTC"
select RT_USING_RTC
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2018-12-5 SummerGift first version
* 2020-5-17 yufanyufan77 support H7
*/
#ifndef _FAL_CFG_H_
#define _FAL_CFG_H_
#include <rtthread.h>
#include <board.h>
#define FLASH_SIZE_GRANULARITY_128K (16 * 128 * 1024)
#define STM32_FLASH_START_ADRESS_128K (0x8000000)
extern const struct fal_flash_dev stm32_onchip_flash_128k;
/* flash device table */
#define FAL_FLASH_DEV_TABLE \
{ \
&stm32_onchip_flash_128k, \
}
/* ====================== Partition Configuration ========================== */
#ifdef FAL_PART_HAS_TABLE_CFG
/* partition table */
#define FAL_PART_TABLE \
{ \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , 8*128*1024, 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_128k", 8*128*1024 , 128*1024, 0}, \
{FAL_PART_MAGIC_WROD, "factory", "onchip_flash_128k", 9*128*1024 , 7*128*1024, 0}, \
}
#endif /* FAL_PART_HAS_TABLE_CFG */
#endif /* _FAL_CFG_H_ */