完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
各位早上好。
我试图擦除闪存块。我尽量不使用驱动程序。现在,我按照参考手册第614页设法用存储数据对闪存的各个存储单元进行编程。 现在,为了存储新值,我想按照第616页的指南以编程方式擦除闪存块。 我使用以下代码: 问题是,在将MCR [EHV]设置为1后,微观误差。奇怪的是MCR [RWE]设置为1,表示读取写入事件错误。我不明白为什么会这样。 我正在尝试对没有程序代码(只有存储值)的块进行操作,并且我正在执行RM规定的操作。该块未锁定:HBL寄存器中的相应位设置为0。 使用其他工具重置工作,因此不是闪存的问题,而是代码的问题。 有人对这段代码有一些了解吗? 谢谢, 伊万 #闪存擦除 以上来自于谷歌翻译 以下为原文 Good morning to everyone. I am trying to erase a flash memory block. I am try not to use the drivers. As now, I managed to program individual memory cells of the flash memory with storage data, following the Reference Manual at page 614. Now, in order to store new values, I want to programmatically erase a flash memory block following the guide at page 616. I use the following code:
The problem is that, after setting MCR[EHV] to 1, the micro go in error. The strange thing is that MCR[RWE] is set to 1, indicating a Read While Write Event Error. I don't understand why this is the case. I am trying the operation on a block where there is no program code (only a stored value) and I am doing the actions prescribed by the RM. The block is not locked: the corresponding bit in HBL register is set to 0. Resets using other tools work, so is not a problem of the flash, but of the code. Someone has some idea regarding this code snippet? Thank you, Ivan #flash-erase |
|
相关推荐
3个回答
|
|
你好伊万,
抱歉回复晚了, 你解决了这个问题吗? 你能确认使用的设备吗? 您可以在SPC5Studio Eclipse市场中找到闪存驱动程序。 (比较截图) 通常,在生成内部擦除序列后,您必须等待完成 / *等待完成然后停止操作。* / 而(!DFLASH.MCR.B.DONE) ; 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Ivan , sorry for the late answer, Did you solve the issue ? Could you confirm the device used ? you can find the flash driver in the SPC5Studio Eclipse marketplace. (cf screenshot) often , after generating an internal erase sequence , you have to wait for completion /* Waiting completion then stopping operation.*/ while (!DFLASH.MCR.B.DONE) ; Best regards Erwan |
|
|
|
|
|
|
|
你好Erwan。
我找到了你说过的驱动程序并学会了使用它。 现在问题解决了。 谢谢, 伊万 以上来自于谷歌翻译 以下为原文 Hello Erwan. I found the driver of which you spoke and learned to use it. Now the issue is solved. Thank you, Ivan |
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
935 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
986 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3154 浏览 1 评论
3415 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2012 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
166浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
183浏览 5评论
206浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
252浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
193浏览 5评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-7-18 14:03 , Processed in 1.922958 second(s), Total 81, Slave 65 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191