提交 c0855d13 编写于 作者: J jinsheng

增加 flash

上级 8e28732f
......@@ -52,6 +52,7 @@ static rt_uint32_t GetSector(rt_uint32_t Address)
{
sector = FLASH_SECTOR_1;
}
#if (FLASH_SECTOR_TOTAL >= 4)
else if ((Address < ADDR_FLASH_SECTOR_3) && (Address >= ADDR_FLASH_SECTOR_2))
{
sector = FLASH_SECTOR_2;
......@@ -60,6 +61,7 @@ static rt_uint32_t GetSector(rt_uint32_t Address)
{
sector = FLASH_SECTOR_3;
}
#elif (FLASH_SECTOR_TOTAL >= 8)
else if ((Address < ADDR_FLASH_SECTOR_5) && (Address >= ADDR_FLASH_SECTOR_4))
{
sector = FLASH_SECTOR_4;
......@@ -76,6 +78,7 @@ static rt_uint32_t GetSector(rt_uint32_t Address)
{
sector = FLASH_SECTOR_7;
}
#elif (FLASH_SECTOR_TOTAL >= 24)
else if ((Address < ADDR_FLASH_SECTOR_9) && (Address >= ADDR_FLASH_SECTOR_8))
{
sector = FLASH_SECTOR_8;
......@@ -88,10 +91,18 @@ static rt_uint32_t GetSector(rt_uint32_t Address)
{
sector = FLASH_SECTOR_10;
}
else /* (Address < FLASH_END_ADDR) && (Address >= ADDR_FLASH_SECTOR_11) */
#else
else
{
#if (FLASH_SECTOR_TOTAL == 4)
sector = FLASH_SECTOR_4;
#elif (FLASH_SECTOR_TOTAL == 8)
sector = FLASH_SECTOR_8;
#elif (FLASH_SECTOR_TOTAL == 24)
sector = FLASH_SECTOR_11;
#endif
}
#endif
return sector;
}
......
......@@ -320,6 +320,7 @@ CONFIG_BSP_USING_GPIO=y
CONFIG_BSP_USING_UART=y
CONFIG_BSP_USING_UART1=y
# CONFIG_BSP_UART1_RX_USING_DMA is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
# CONFIG_BSP_USING_QSPI is not set
# CONFIG_BSP_USING_SDIO is not set
......
......@@ -53,7 +53,7 @@ STM32F746-disco 是 ST 推出的一款基于 ARM Cortex-M7 内核的开发板,
| SPI | 暂不支持 | 即将支持 |
| QSPI | 支持 | QSPI1 |
| I2C | 暂不支持 | 即将支持 |
| FLASH | 暂不支持 | 即将支持 |
| FLASH | 支持 | |
| WDT | 暂不支持 | 即将支持 |
| SDIO | 支持 | 支持 |
| USB Device | 暂不支持 | 即将支持 |
......
......@@ -61,6 +61,9 @@ menu "On-chip Peripheral Drivers"
depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
default n
endif
config BSP_USING_ON_CHIP_FLASH
bool "Enable on-chip FLASH"
default n
config BSP_USING_QSPI
bool "Enable QSPI BUS"
select RT_USING_QSPI
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册