Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
FAL
关于FAL移植
发布于 2019-01-15 10:32:40 浏览:2878
订阅该版
git提供的fal例程是STM32F2标准库的,移植到我的F4开发板上,read,write都正常,但是erase 会崩溃,只能重新下载程序,不知道是代码问题还是硬件问题,求大神相助:( /* * File : fal_flash_stm32f2_port.c * This file is part of FAL (Flash Abstraction Layer) package * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Change Logs: * Date Author Notes * 2018-01-26 armink the first version */ #include
#include
/* base address of the flash sectors */ #define ADDR_FLASH_SECTOR_0 ((u32)0x08000000) //ÉÈÇø0ÆðʼµØÖ·, 16 Kbytes #define ADDR_FLASH_SECTOR_1 ((u32)0x08004000) //ÉÈÇø1ÆðʼµØÖ·, 16 Kbytes #define ADDR_FLASH_SECTOR_2 ((u32)0x08008000) //ÉÈÇø2ÆðʼµØÖ·, 16 Kbytes #define ADDR_FLASH_SECTOR_3 ((u32)0x0800C000) //ÉÈÇø3ÆðʼµØÖ·, 16 Kbytes #define ADDR_FLASH_SECTOR_4 ((u32)0x08010000) //ÉÈÇø4ÆðʼµØÖ·, 64 Kbytes #define ADDR_FLASH_SECTOR_5 ((u32)0x08020000) //ÉÈÇø5ÆðʼµØÖ·, 128 Kbytes #define ADDR_FLASH_SECTOR_6 ((u32)0x08040000) //ÉÈÇø6ÆðʼµØÖ·, 128 Kbytes #define ADDR_FLASH_SECTOR_7 ((u32)0x08060000) //ÉÈÇø7ÆðʼµØÖ·, 128 Kbytes #define ADDR_FLASH_SECTOR_8 ((u32)0x08080000) //ÉÈÇø8ÆðʼµØÖ·, 128 Kbytes #define ADDR_FLASH_SECTOR_9 ((u32)0x080A0000) //ÉÈÇø9ÆðʼµØÖ·, 128 Kbytes #define ADDR_FLASH_SECTOR_10 ((u32)0x080C0000) //ÉÈÇø10ÆðʼµØÖ·,128 Kbytes #define ADDR_FLASH_SECTOR_11 ((u32)0x080E0000) //ÉÈÇø11ÆðʼµØÖ·,128 Kbytes /** * Get the sector of a given address * * @param address flash address * * @return The sector of a given address */ static uint32_t stm32_get_sector(uint32_t address) { if(address
查看更多
2
个回答
默认排序
按发布时间排序
armink
2019-01-15
这家伙很懒,什么也没写!
直接用新重构的 STM32 BSP 嘛,里面有现成的 f4 flash 驱动,并且对接好的 fal [url]https://github.com/RT-Thread/rt-thread/blob/master/bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_f4.c[/url]
JASON1101
2019-01-15
这家伙很懒,什么也没写!
[quote][size=2][url=forum.php?mod=redirect&goto=findpost&pid=42521&ptid=10170][color=#999999]armink 发表于 2019-1-15 10:35[/color][/url][/size] 直接用新重构的 STM32 BSP 嘛,里面有现成的 f4 flash 驱动,并且对接好的 fal https://github.com/RT-Thr ...[/quote] 好的,谢谢:handshake
撰写答案
登录
注册新账号
关注者
0
被浏览
2.9k
关于作者
JASON1101
这家伙很懒,什么也没写!
提问
1
回答
1
被采纳
0
关注TA
发私信
相关问题
1
添加fal软件包之后编译出现错误,求助!
2
关于easyflash4.0的写入和读取norflash一些疑惑咨询
3
FAL驱动移植&构建脚本问题
4
帮我看一下这样分区会不会冲突??
5
EasyFlash 4.0疑似出BUG
6
疑似FAL日志输出与DFS冲突??
7
fal软件包偏移量大于等于当前分区的大小会报错
8
为什么片内Flash总是写失败?
9
片上flash的文件系统的建立
10
潘多拉 fal bench 失败【已解决】
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
机器人操作系统 (ROS2) 和 RT-Thread 通信
4
五分钟玩转RT-Thread新社区
5
国产MCU移植系列教程汇总,欢迎查看!
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
RTT平台 zephyr_polling软件包 Bluenrg2 蓝牙芯片启动流程
2
【有奖直播】B站直播志愿者招募
3
RT-Thread USB HID实现数据收发时遇到数据发送不了
4
在 Linux 中使用 RT-Thread Env 工具的简明指南
5
梁山派GD32F450/470-RT-Thread Nano 移植 (三)
热门标签
RT-Thread Studio
串口
Env
LWIP
AT
SPI
Bootloader
FinSH
ART-Pi
CAN总线
Hardfault
USB
文件系统
DMA
RT-Thread
SCons
线程
RT-Thread Nano
MQTT
stm32
ESP8266
rt-smart
WIZnet_W5500
RTC
flash
ota
UART
FAL
packages_软件包
I2C
freemodbus
潘多拉开发板_Pandora
cubemx
定时器
BSP
PWM
ADC
socket
AB32VG1
SDIO
keil_MDK
中断
消息队列_msg_queue
编译报错
Debug
C++_cpp
msh
QEMU
SFUD
MicroPython
本月问答贡献
张世争
19
个答案
4
次被采纳
道友
40
个答案
3
次被采纳
CrazyH
50
个答案
2
次被采纳
踩姑娘的小蘑菇
14
个答案
2
次被采纳
xiaorui
7
个答案
2
次被采纳
本月文章贡献
paradox
5
篇文章
2
次点赞
螺丝松掉的人
4
篇文章
12
次点赞
子牧r
3
篇文章
2
次点赞
BURRIEROW
2
篇文章
5
次点赞
小手凉凉
2
篇文章
4
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部