完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨!
我正在尝试仅使用数据表来实现一个SWIM程序员。 我有基本的工作(游泳入口,rotf,wotf,srst)。我一直试图弄清楚如何实际编程闪存。 我可以将MASS密钥写入FLASH_PUKR并验证PUL是否已设置。 我可以验证FLASH_FPR是否未设置。 据我所知,发送wotf命令到闪存区域(0x8000-0x9FFF)应该只需要,但这样做只会在FLASH_IASPR中设置WR_PG_DIS,表明内存受到保护。我在这里想念的是什么? 提前致谢! //垫 #游泳wr_pg_dis快闪STM8 以上来自于谷歌翻译 以下为原文 Hi! I'm trying to implement a SWIM programmer using only the datasheets, for an . I have got the basics working (swim entry, rotf, wotf, srst). An I've been trying to figure out how to actually program the flash. I can write MASS key to FLASH_PUKR and can verify that PUL is set. I can verify FLASH_FPR is unset. As far as I can tell, issuing wotf commands to the flash memory region (0x8000-0x9FFF) should be all that is required, but doing so only sets WR_PG_DIS in FLASH_IASPR, indicating that memory is protected. What am I missing here? Thanks in advance! //Mats #swim-wr_pg_dis-flash-stm8 |
|
相关推荐
2个回答
|
|
我将在我获得它时添加MCU进行预编程并锁定。我已经尝试通过向OPT0(ROP)写入0x00来禁用ROP(在DUKR上设置MASS并设置OPT位之后),我不知道这是否真的有效,但是该单元不再运行提供的程序了最小。
即使发生了什么事,我似乎也无法编写新数据。还有什么可以解锁/擦除MCU吗? 这真是令人沮丧,因为我到目前为止找到的文档(RM0016 - 参考手册STM8S系列和STM8AF系列8位微控制器,UM0470-用户手册STM8 SWIM通信协议和调试模块和PM0051 - 编程手册如何编程STM8S ,STM8A闪存程序存储器和数据EEPROM以及STM8S003F3的数据表都不够详细。 我一直在尝试在网上搜索线索,甚至查看我能找到的开源SWIM程序员项目的来源,但到目前为止我还没能找到丢失的部分。 最好的祝福 垫 以上来自于谷歌翻译 以下为原文 I'll add that the MCU when I got it was preprogrammed, and locked. I've tried disabling ROP by writing 0x00 to OPT0 (ROP) (after MASS on DUKR and setting the OPT bit), and I don't know if that really worked or not, but the unit is not running the supplied program anymore at least. Even though something happened, I don't seem to be able write new data. Is there anything else to unlocking/erasing the MCU? This is really frustrating, as the documentation that I've found thus far (RM0016 - Reference manual STM8S series and STM8AF series 8-bit microcontrollers, UM0470- User manual STM8 SWIM communication protocol and debug module and PM0051 - Programming manual How to program STM8S, STM8A Flash program memory and data EEPROM and the data sheet for STM8S003F3) are not detailed enough. I've been trying to search the web for clues and even look into the source of the open source SWIM programmer projects I can find, but so far I haven't been able to find the missing piece(s). Best Regards Mats |
|
|
|
好的,所以我把它排序了。问题是我的重置ROP的代码并不完全正确。 ROP发布了,但我想还没完成。
解决方案是在发出ROP复位后轮询EOP位直到设置。这实际上是我已经实现的东西,但我有一个bug,所以它不起作用。我尝试插入延迟,然后突然它起作用,这就是我如何抓住这个bug。 令人沮丧的主要原因是文档真的不够详细...... ROP禁用,实际上只是一瞥,EOP是从文档的其他部分推断的,但是在哪种情况下EOP并不是很清楚已设定。 我很高兴我让它工作了 |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
1622 浏览 1 评论
2310 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1521 浏览 1 评论
2908 浏览 6 评论
5404 浏览 21 评论
400浏览 4评论
687浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
298浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
749浏览 3评论
638浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-5-15 22:40 , Processed in 1.007593 second(s), Total 79, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号