Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
aa1e41d0
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
aa1e41d0
编写于
1月 28, 2019
作者:
B
Bernard Xiong
提交者:
GitHub
1月 28, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2288 from SummerGGift/add_stm32_new_framework
[bsp][stm32] optimize stm32 series BSP
上级
d53a8f55
532a14dd
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
71 addition
and
47 deletion
+71
-47
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c
+3
-3
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f7.c
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f7.c
+3
-3
bsp/stm32/stm32f103-atk-nano/board/Kconfig
bsp/stm32/stm32f103-atk-nano/board/Kconfig
+1
-1
bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig
bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig
+1
-1
bsp/stm32/stm32f407-atk-explorer/board/Kconfig
bsp/stm32/stm32f407-atk-explorer/board/Kconfig
+1
-1
bsp/stm32/stm32f407-atk-explorer/board/ports/fal_cfg.h
bsp/stm32/stm32f407-atk-explorer/board/ports/fal_cfg.h
+9
-5
bsp/stm32/stm32f429-armfly-v6/board/Kconfig
bsp/stm32/stm32f429-armfly-v6/board/Kconfig
+1
-1
bsp/stm32/stm32f429-armfly-v6/board/ports/fal_cfg.h
bsp/stm32/stm32f429-armfly-v6/board/ports/fal_cfg.h
+9
-5
bsp/stm32/stm32f429-atk-apollo/board/Kconfig
bsp/stm32/stm32f429-atk-apollo/board/Kconfig
+1
-1
bsp/stm32/stm32f429-atk-apollo/board/ports/fal_cfg.h
bsp/stm32/stm32f429-atk-apollo/board/ports/fal_cfg.h
+9
-5
bsp/stm32/stm32f429-fire-challenger/board/Kconfig
bsp/stm32/stm32f429-fire-challenger/board/Kconfig
+1
-1
bsp/stm32/stm32f429-fire-challenger/board/ports/fal_cfg.h
bsp/stm32/stm32f429-fire-challenger/board/ports/fal_cfg.h
+9
-5
bsp/stm32/stm32f767-atk-apollo/board/Kconfig
bsp/stm32/stm32f767-atk-apollo/board/Kconfig
+1
-1
bsp/stm32/stm32f767-atk-apollo/board/ports/drv_qspi_flash.c
bsp/stm32/stm32f767-atk-apollo/board/ports/drv_qspi_flash.c
+1
-1
bsp/stm32/stm32f767-atk-apollo/board/ports/fal_cfg.h
bsp/stm32/stm32f767-atk-apollo/board/ports/fal_cfg.h
+9
-5
bsp/stm32/stm32f767-fire-challenger/board/ports/drv_qspi_flash.c
...32/stm32f767-fire-challenger/board/ports/drv_qspi_flash.c
+1
-1
bsp/stm32/stm32f767-fire-challenger/board/ports/fal_cfg.h
bsp/stm32/stm32f767-fire-challenger/board/ports/fal_cfg.h
+9
-5
bsp/stm32/stm32l475-atk-pandora/board/Kconfig
bsp/stm32/stm32l475-atk-pandora/board/Kconfig
+1
-1
bsp/stm32/stm32l475-atk-pandora/board/ports/drv_qspi_flash.c
bsp/stm32/stm32l475-atk-pandora/board/ports/drv_qspi_flash.c
+1
-1
未找到文件。
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c
浏览文件 @
aa1e41d0
...
...
@@ -327,9 +327,9 @@ static int fal_flash_erase_16k(long offset, size_t size);
static
int
fal_flash_erase_64k
(
long
offset
,
size_t
size
);
static
int
fal_flash_erase_128k
(
long
offset
,
size_t
size
);
const
struct
fal_flash_dev
stm32_onchip_flash_16k
=
{
"onchip_flash_16k"
,
STM32_FLASH_START_ADRESS
,
FLASH_SIZE_GRANULARITY_16K
,
(
16
*
1024
),
{
NULL
,
fal_flash_read_16k
,
fal_flash_write_16k
,
fal_flash_erase_16k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_64k
=
{
"onchip_flash_64k"
,
STM32_FLASH_START_ADRESS
,
FLASH_SIZE_GRANULARITY_64K
,
(
64
*
1024
),
{
NULL
,
fal_flash_read_64k
,
fal_flash_write_64k
,
fal_flash_erase_64k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_128k
=
{
"onchip_flash_128k"
,
STM32_FLASH_START_ADRESS
,
FLASH_SIZE_GRANULARITY_128K
,
(
128
*
1024
),
{
NULL
,
fal_flash_read_128k
,
fal_flash_write_128k
,
fal_flash_erase_128k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_16k
=
{
"onchip_flash_16k"
,
STM32_FLASH_START_ADRESS
_16K
,
FLASH_SIZE_GRANULARITY_16K
,
(
16
*
1024
),
{
NULL
,
fal_flash_read_16k
,
fal_flash_write_16k
,
fal_flash_erase_16k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_64k
=
{
"onchip_flash_64k"
,
STM32_FLASH_START_ADRESS
_64K
,
FLASH_SIZE_GRANULARITY_64K
,
(
64
*
1024
),
{
NULL
,
fal_flash_read_64k
,
fal_flash_write_64k
,
fal_flash_erase_64k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_128k
=
{
"onchip_flash_128k"
,
STM32_FLASH_START_ADRESS
_128K
,
FLASH_SIZE_GRANULARITY_128K
,
(
128
*
1024
),
{
NULL
,
fal_flash_read_128k
,
fal_flash_write_128k
,
fal_flash_erase_128k
}
};
static
int
fal_flash_read_16k
(
long
offset
,
rt_uint8_t
*
buf
,
size_t
size
)
{
...
...
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f7.c
浏览文件 @
aa1e41d0
...
...
@@ -253,9 +253,9 @@ static int fal_flash_erase_32k(long offset, size_t size);
static
int
fal_flash_erase_128k
(
long
offset
,
size_t
size
);
static
int
fal_flash_erase_256k
(
long
offset
,
size_t
size
);
const
struct
fal_flash_dev
stm32_onchip_flash_32k
=
{
"onchip_flash_32k"
,
STM32_FLASH_START_ADRESS
,
FLASH_SIZE_GRANULARITY_32K
,
(
32
*
1024
),
{
NULL
,
fal_flash_read_32k
,
fal_flash_write_32k
,
fal_flash_erase_32k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_128k
=
{
"onchip_flash_128k"
,
STM32_FLASH_START_ADRESS
,
FLASH_SIZE_GRANULARITY_128K
,
(
128
*
1024
),
{
NULL
,
fal_flash_read_128k
,
fal_flash_write_128k
,
fal_flash_erase_128k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_256k
=
{
"onchip_flash_256k"
,
STM32_FLASH_START_ADRESS
,
FLASH_SIZE_GRANULARITY_256K
,
(
256
*
1024
),
{
NULL
,
fal_flash_read_256k
,
fal_flash_write_256k
,
fal_flash_erase_256k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_32k
=
{
"onchip_flash_32k"
,
STM32_FLASH_START_ADRESS
_32K
,
FLASH_SIZE_GRANULARITY_32K
,
(
32
*
1024
),
{
NULL
,
fal_flash_read_32k
,
fal_flash_write_32k
,
fal_flash_erase_32k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_128k
=
{
"onchip_flash_128k"
,
STM32_FLASH_START_ADRESS
_128K
,
FLASH_SIZE_GRANULARITY_128K
,
(
128
*
1024
),
{
NULL
,
fal_flash_read_128k
,
fal_flash_write_128k
,
fal_flash_erase_128k
}
};
const
struct
fal_flash_dev
stm32_onchip_flash_256k
=
{
"onchip_flash_256k"
,
STM32_FLASH_START_ADRESS
_256K
,
FLASH_SIZE_GRANULARITY_256K
,
(
256
*
1024
),
{
NULL
,
fal_flash_read_256k
,
fal_flash_write_256k
,
fal_flash_erase_256k
}
};
static
int
fal_flash_read_32k
(
long
offset
,
rt_uint8_t
*
buf
,
size_t
size
)
{
...
...
bsp/stm32/stm32f103-atk-nano/board/Kconfig
浏览文件 @
aa1e41d0
...
...
@@ -19,7 +19,7 @@ menu "Onboard Peripheral Drivers"
default n
config BSP_USING_SPI_FLASH
bool "Enable SPI FLASH (
w25q
16 spi2)"
bool "Enable SPI FLASH (
W25Q
16 spi2)"
select BSP_USING_SPI
select BSP_USING_SPI2
select RT_USING_SFUD
...
...
bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig
浏览文件 @
aa1e41d0
...
...
@@ -19,7 +19,7 @@ menu "Onboard Peripheral Drivers"
default n
config BSP_USING_SPI_FLASH
bool "Enable SPI FLASH (
w25q
64 spi1)"
bool "Enable SPI FLASH (
W25Q
64 spi1)"
select BSP_USING_SPI
select BSP_USING_SPI1
select RT_USING_SFUD
...
...
bsp/stm32/stm32f407-atk-explorer/board/Kconfig
浏览文件 @
aa1e41d0
...
...
@@ -26,7 +26,7 @@ menu "Onboard Peripheral Drivers"
default n
config BSP_USING_SPI_FLASH
bool "Enable SPI FLASH (
w25q
128 spi1)"
bool "Enable SPI FLASH (
W25Q
128 spi1)"
select BSP_USING_SPI
select BSP_USING_SPI1
select RT_USING_SFUD
...
...
bsp/stm32/stm32f407-atk-explorer/board/ports/fal_cfg.h
浏览文件 @
aa1e41d0
...
...
@@ -15,8 +15,12 @@
#include <board.h>
#define FLASH_SIZE_GRANULARITY_16K (4 * 16 * 1024)
#define FLASH_SIZE_GRANULARITY_64K (FLASH_SIZE_GRANULARITY_16K + 64 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (FLASH_SIZE_GRANULARITY_64K + 7 * 128 * 1024)
#define FLASH_SIZE_GRANULARITY_64K (64 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (7 * 128 * 1024)
#define STM32_FLASH_START_ADRESS_16K STM32_FLASH_START_ADRESS
#define STM32_FLASH_START_ADRESS_64K (STM32_FLASH_START_ADRESS_16K + FLASH_SIZE_GRANULARITY_16K)
#define STM32_FLASH_START_ADRESS_128K (STM32_FLASH_START_ADRESS_64K + FLASH_SIZE_GRANULARITY_64K)
extern
const
struct
fal_flash_dev
stm32_onchip_flash_16k
;
extern
const
struct
fal_flash_dev
stm32_onchip_flash_64k
;
...
...
@@ -35,9 +39,9 @@ extern const struct fal_flash_dev stm32_onchip_flash_128k;
/* partition table */
#define FAL_PART_TABLE \
{ \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 ,
FLASH_SIZE_GRANULARITY_16K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k",
FLASH_SIZE_GRANULARITY_16K
, FLASH_SIZE_GRANULARITY_64K , 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k",
FLASH_SIZE_GRANULARITY_64K,
FLASH_SIZE_GRANULARITY_128K, 0}, \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 , FLASH_SIZE_GRANULARITY_16K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k",
0
, FLASH_SIZE_GRANULARITY_64K , 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k",
0 ,
FLASH_SIZE_GRANULARITY_128K, 0}, \
}
#endif
/* FAL_PART_HAS_TABLE_CFG */
...
...
bsp/stm32/stm32f429-armfly-v6/board/Kconfig
浏览文件 @
aa1e41d0
...
...
@@ -24,7 +24,7 @@ menu "Onboard Peripheral Drivers"
default n
config BSP_USING_SPI_FLASH
bool "Enable SPI FLASH (
w25q
64 spi3)"
bool "Enable SPI FLASH (
W25Q
64 spi3)"
select BSP_USING_SPI
select BSP_USING_SPI3
select RT_USING_SFUD
...
...
bsp/stm32/stm32f429-armfly-v6/board/ports/fal_cfg.h
浏览文件 @
aa1e41d0
...
...
@@ -15,8 +15,12 @@
#include <board.h>
#define FLASH_SIZE_GRANULARITY_16K (4 * 16 * 1024)
#define FLASH_SIZE_GRANULARITY_64K (FLASH_SIZE_GRANULARITY_16K + 64 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (FLASH_SIZE_GRANULARITY_64K + 7 * 128 * 1024)
#define FLASH_SIZE_GRANULARITY_64K (64 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (7 * 128 * 1024)
#define STM32_FLASH_START_ADRESS_16K STM32_FLASH_START_ADRESS
#define STM32_FLASH_START_ADRESS_64K (STM32_FLASH_START_ADRESS_16K + FLASH_SIZE_GRANULARITY_16K)
#define STM32_FLASH_START_ADRESS_128K (STM32_FLASH_START_ADRESS_64K + FLASH_SIZE_GRANULARITY_64K)
extern
const
struct
fal_flash_dev
stm32_onchip_flash_16k
;
extern
const
struct
fal_flash_dev
stm32_onchip_flash_64k
;
...
...
@@ -35,9 +39,9 @@ extern const struct fal_flash_dev stm32_onchip_flash_128k;
/* partition table */
#define FAL_PART_TABLE \
{ \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 ,
FLASH_SIZE_GRANULARITY_16K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k",
FLASH_SIZE_GRANULARITY_16K
, FLASH_SIZE_GRANULARITY_64K , 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k",
FLASH_SIZE_GRANULARITY_64K
, FLASH_SIZE_GRANULARITY_128K, 0}, \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 , FLASH_SIZE_GRANULARITY_16K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k",
0
, FLASH_SIZE_GRANULARITY_64K , 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k",
0
, FLASH_SIZE_GRANULARITY_128K, 0}, \
}
#endif
/* FAL_PART_HAS_TABLE_CFG */
...
...
bsp/stm32/stm32f429-atk-apollo/board/Kconfig
浏览文件 @
aa1e41d0
...
...
@@ -30,7 +30,7 @@ menu "Onboard Peripheral Drivers"
default n
config BSP_USING_SPI_FLASH
bool "Enable SPI FLASH (
w25q
256 spi5)"
bool "Enable SPI FLASH (
W25Q
256 spi5)"
select BSP_USING_SPI
select BSP_USING_SPI5
select RT_USING_SFUD
...
...
bsp/stm32/stm32f429-atk-apollo/board/ports/fal_cfg.h
浏览文件 @
aa1e41d0
...
...
@@ -15,8 +15,12 @@
#include <board.h>
#define FLASH_SIZE_GRANULARITY_16K (4 * 16 * 1024)
#define FLASH_SIZE_GRANULARITY_64K (FLASH_SIZE_GRANULARITY_16K + 64 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (FLASH_SIZE_GRANULARITY_64K + 7 * 128 * 1024)
#define FLASH_SIZE_GRANULARITY_64K (64 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (7 * 128 * 1024)
#define STM32_FLASH_START_ADRESS_16K STM32_FLASH_START_ADRESS
#define STM32_FLASH_START_ADRESS_64K (STM32_FLASH_START_ADRESS_16K + FLASH_SIZE_GRANULARITY_16K)
#define STM32_FLASH_START_ADRESS_128K (STM32_FLASH_START_ADRESS_64K + FLASH_SIZE_GRANULARITY_64K)
extern
const
struct
fal_flash_dev
stm32_onchip_flash_16k
;
extern
const
struct
fal_flash_dev
stm32_onchip_flash_64k
;
...
...
@@ -35,9 +39,9 @@ extern const struct fal_flash_dev stm32_onchip_flash_128k;
/* partition table */
#define FAL_PART_TABLE \
{ \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 ,
FLASH_SIZE_GRANULARITY_16K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k",
FLASH_SIZE_GRANULARITY_16K
, FLASH_SIZE_GRANULARITY_64K , 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k",
FLASH_SIZE_GRANULARITY_64K
, FLASH_SIZE_GRANULARITY_128K, 0}, \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 , FLASH_SIZE_GRANULARITY_16K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k",
0
, FLASH_SIZE_GRANULARITY_64K , 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k",
0
, FLASH_SIZE_GRANULARITY_128K, 0}, \
}
#endif
/* FAL_PART_HAS_TABLE_CFG */
...
...
bsp/stm32/stm32f429-fire-challenger/board/Kconfig
浏览文件 @
aa1e41d0
...
...
@@ -25,7 +25,7 @@ menu "Onboard Peripheral Drivers"
default n
config BSP_USING_SPI_FLASH
bool "Enable SPI FLASH (
w25q256
spi5)"
bool "Enable SPI FLASH (
W25Q128
spi5)"
select BSP_USING_SPI
select BSP_USING_SPI5
select RT_USING_SFUD
...
...
bsp/stm32/stm32f429-fire-challenger/board/ports/fal_cfg.h
浏览文件 @
aa1e41d0
...
...
@@ -15,8 +15,12 @@
#include <board.h>
#define FLASH_SIZE_GRANULARITY_16K (4 * 16 * 1024)
#define FLASH_SIZE_GRANULARITY_64K (FLASH_SIZE_GRANULARITY_16K + 64 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (FLASH_SIZE_GRANULARITY_64K + 7 * 128 * 1024)
#define FLASH_SIZE_GRANULARITY_64K (64 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (7 * 128 * 1024)
#define STM32_FLASH_START_ADRESS_16K STM32_FLASH_START_ADRESS
#define STM32_FLASH_START_ADRESS_64K (STM32_FLASH_START_ADRESS_16K + FLASH_SIZE_GRANULARITY_16K)
#define STM32_FLASH_START_ADRESS_128K (STM32_FLASH_START_ADRESS_64K + FLASH_SIZE_GRANULARITY_64K)
extern
const
struct
fal_flash_dev
stm32_onchip_flash_16k
;
extern
const
struct
fal_flash_dev
stm32_onchip_flash_64k
;
...
...
@@ -35,9 +39,9 @@ extern const struct fal_flash_dev stm32_onchip_flash_128k;
/* partition table */
#define FAL_PART_TABLE \
{ \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 ,
FLASH_SIZE_GRANULARITY_16K , 0}, \
{FAL_PART_MAGIC_WROD, "
app", "onchip_flash_64k", FLASH_SIZE_GRANULARITY_16K
, FLASH_SIZE_GRANULARITY_64K , 0}, \
{FAL_PART_MAGIC_WROD, "
download", "onchip_flash_128k", FLASH_SIZE_GRANULARITY_64K
, FLASH_SIZE_GRANULARITY_128K, 0}, \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 , FLASH_SIZE_GRANULARITY_16K , 0}, \
{FAL_PART_MAGIC_WROD, "
param", "onchip_flash_64k", 0
, FLASH_SIZE_GRANULARITY_64K , 0}, \
{FAL_PART_MAGIC_WROD, "
app", "onchip_flash_128k", 0
, FLASH_SIZE_GRANULARITY_128K, 0}, \
}
#endif
/* FAL_PART_HAS_TABLE_CFG */
...
...
bsp/stm32/stm32f767-atk-apollo/board/Kconfig
浏览文件 @
aa1e41d0
...
...
@@ -24,7 +24,7 @@ menu "Onboard Peripheral Drivers"
default n
config BSP_USING_QSPI_FLASH
bool "Enable QSPI FLASH (
W25Q256
qspi)"
bool "Enable QSPI FLASH (
w25q128
qspi)"
select BSP_USING_QSPI
select RT_USING_SFUD
select RT_SFUD_USING_QSPI
...
...
bsp/stm32/stm32f767-atk-apollo/board/ports/drv_qspi_flash.c
浏览文件 @
aa1e41d0
...
...
@@ -65,7 +65,7 @@ static int rt_hw_qspi_flash_with_sfud_init(void)
stm32_qspi_bus_attach_device
(
"qspi1"
,
"qspi10"
,
RT_NULL
,
4
,
w25qxx_enter_qspi_mode
,
RT_NULL
);
/* init w25q128 */
if
(
RT_NULL
==
rt_sfud_flash_probe
(
"
w25q
128"
,
"qspi10"
))
if
(
RT_NULL
==
rt_sfud_flash_probe
(
"
W25Q
128"
,
"qspi10"
))
{
return
-
RT_ERROR
;
}
...
...
bsp/stm32/stm32f767-atk-apollo/board/ports/fal_cfg.h
浏览文件 @
aa1e41d0
...
...
@@ -15,8 +15,12 @@
#include <board.h>
#define FLASH_SIZE_GRANULARITY_32K (4 * 32 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (FLASH_SIZE_GRANULARITY_32K + 128 * 1024)
#define FLASH_SIZE_GRANULARITY_256K (FLASH_SIZE_GRANULARITY_128K + 3 * 256 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (128 * 1024)
#define FLASH_SIZE_GRANULARITY_256K (3 * 256 * 1024)
#define STM32_FLASH_START_ADRESS_32K STM32_FLASH_START_ADRESS
#define STM32_FLASH_START_ADRESS_128K (STM32_FLASH_START_ADRESS_32K + FLASH_SIZE_GRANULARITY_32K)
#define STM32_FLASH_START_ADRESS_256K (STM32_FLASH_START_ADRESS_128K + FLASH_SIZE_GRANULARITY_128K)
extern
const
struct
fal_flash_dev
stm32_onchip_flash_32k
;
extern
const
struct
fal_flash_dev
stm32_onchip_flash_128k
;
...
...
@@ -35,9 +39,9 @@ extern const struct fal_flash_dev stm32_onchip_flash_256k;
/* partition table */
#define FAL_PART_TABLE \
{ \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_32k", 0 ,
FLASH_SIZE_GRANULARITY_32K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_128k",
FLASH_SIZE_GRANULARITY_32K
, FLASH_SIZE_GRANULARITY_128K, 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_256k",
FLASH_SIZE_GRANULARITY_128K
, FLASH_SIZE_GRANULARITY_256K, 0}, \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_32k", 0 , FLASH_SIZE_GRANULARITY_32K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_128k",
0
, FLASH_SIZE_GRANULARITY_128K, 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_256k",
0
, FLASH_SIZE_GRANULARITY_256K, 0}, \
}
#endif
/* FAL_PART_HAS_TABLE_CFG */
...
...
bsp/stm32/stm32f767-fire-challenger/board/ports/drv_qspi_flash.c
浏览文件 @
aa1e41d0
...
...
@@ -65,7 +65,7 @@ static int rt_hw_qspi_flash_with_sfud_init(void)
stm32_qspi_bus_attach_device
(
"qspi1"
,
"qspi10"
,
RT_NULL
,
4
,
w25qxx_enter_qspi_mode
,
RT_NULL
);
/* init w25q128 */
if
(
RT_NULL
==
rt_sfud_flash_probe
(
"
w25q
128"
,
"qspi10"
))
if
(
RT_NULL
==
rt_sfud_flash_probe
(
"
W25Q
128"
,
"qspi10"
))
{
return
-
RT_ERROR
;
}
...
...
bsp/stm32/stm32f767-fire-challenger/board/ports/fal_cfg.h
浏览文件 @
aa1e41d0
...
...
@@ -15,8 +15,12 @@
#include <board.h>
#define FLASH_SIZE_GRANULARITY_32K (4 * 32 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (FLASH_SIZE_GRANULARITY_32K + 128 * 1024)
#define FLASH_SIZE_GRANULARITY_256K (FLASH_SIZE_GRANULARITY_128K + 3 * 256 * 1024)
#define FLASH_SIZE_GRANULARITY_128K (128 * 1024)
#define FLASH_SIZE_GRANULARITY_256K (3 * 256 * 1024)
#define STM32_FLASH_START_ADRESS_32K STM32_FLASH_START_ADRESS
#define STM32_FLASH_START_ADRESS_128K (STM32_FLASH_START_ADRESS_32K + FLASH_SIZE_GRANULARITY_32K)
#define STM32_FLASH_START_ADRESS_256K (STM32_FLASH_START_ADRESS_128K + FLASH_SIZE_GRANULARITY_128K)
extern
const
struct
fal_flash_dev
stm32_onchip_flash_32k
;
extern
const
struct
fal_flash_dev
stm32_onchip_flash_128k
;
...
...
@@ -35,9 +39,9 @@ extern const struct fal_flash_dev stm32_onchip_flash_256k;
/* partition table */
#define FAL_PART_TABLE \
{ \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_32k", 0 ,
FLASH_SIZE_GRANULARITY_32K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_128k",
FLASH_SIZE_GRANULARITY_32K
, FLASH_SIZE_GRANULARITY_128K, 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_256k",
FLASH_SIZE_GRANULARITY_128K
, FLASH_SIZE_GRANULARITY_256K, 0}, \
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_32k", 0 , FLASH_SIZE_GRANULARITY_32K , 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_128k",
0
, FLASH_SIZE_GRANULARITY_128K, 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_256k",
0
, FLASH_SIZE_GRANULARITY_256K, 0}, \
}
#endif
/* FAL_PART_HAS_TABLE_CFG */
...
...
bsp/stm32/stm32l475-atk-pandora/board/Kconfig
浏览文件 @
aa1e41d0
...
...
@@ -14,7 +14,7 @@ menu "Onboard Peripheral Drivers"
default y
config BSP_USING_QSPI_FLASH
bool "Enable QSPI FLASH"
bool "Enable QSPI FLASH
(W25Q128 qspi1)
"
select BSP_USING_QSPI
select RT_USING_SFUD
select RT_SFUD_USING_QSPI
...
...
bsp/stm32/stm32l475-atk-pandora/board/ports/drv_qspi_flash.c
浏览文件 @
aa1e41d0
...
...
@@ -65,7 +65,7 @@ static int rt_hw_qspi_flash_with_sfud_init(void)
stm32_qspi_bus_attach_device
(
"qspi1"
,
"qspi10"
,
RT_NULL
,
4
,
w25qxx_enter_qspi_mode
,
RT_NULL
);
/* init w25q128 */
if
(
RT_NULL
==
rt_sfud_flash_probe
(
"
w25q
128"
,
"qspi10"
))
if
(
RT_NULL
==
rt_sfud_flash_probe
(
"
W25Q
128"
,
"qspi10"
))
{
return
-
RT_ERROR
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录