完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在尝试使用icp方法通过游泳界面编程stm8s105,并使用STM32F4发现板作为主机和我编写的固件。
我可以启用stm8s的游泳界面,我可以读取和写入eeprom内存和寄存器,我也可以读取闪存程序存储器但是我无法启用对该存储器的写访问,实际上FLASH_IAPSR寄存器中的PUL位始终设置为即使成功写入FLASH_PUKR寄存器后也为0。 有没有人遇到类似的问题? 我们非常欢迎任何建议或有用的信息 以上来自于谷歌翻译 以下为原文 I'm trying to program an stm8s105 using icp method through the swim interface and using an STM32F4 discovery board as host and a firmware written by me. I can enable the swim interface of the stm8s and i can read and write eeprom memory and registers, i can also read flash program memory but i can not enable write access to this memory in fact the PUL bit in the FLASH_IAPSR register is always set to 0 even after a successfull writing of FLASH_PUKR register. Has anyone encountered similar issues? Any advice or useful information is very welcome |
|
相关推荐
4个回答
|
|
你好
这太可怕了 - 太可怕了! 你用'条目'做'解锁'吗? //解锁FLASH存储器(MASS序列) //在FLASH_PUKR(0x5062)中写入0x56然后写入0xAE 你把0x10写入FLASH_CR2吗? 0xFE到FLASH_NCR2 开始扇区编程序列? 以上来自于谷歌翻译 以下为原文 Hi It is all horrible - truly horrible! Do you do the 'unlock' with the 'entry' ? // unlock FLASH memory (MASS sequence) // Write 0x56 then 0xAE in FLASH_PUKR (0x5062) Do you write 0x10 to FLASH_CR2 0xFE to FLASH_NCR2 to start the sector programming sequence? |
|
|
|
嗨,
我没有尝试进行块编程,我正在尝试使用WOTF命令进行字节编程,如文档PM0051中所述,并且我遵循4.6.1 ICP方法 - 第一种方法中解释的所有步骤,但我只能解锁eeprom内存 以上来自于谷歌翻译 以下为原文 Hi, i am not trying to do block programming, i am trying to do byte programming with the WOTF command as explained in the document PM0051 and i follow all the steps explained at the paragraph 4.6.1 ICP Methods - First method but i am able only to unlock the eeprom memory |
|
|
|
好的 - 我确实说整件事情太可怕了。
我能做的就是告诉你我为SWIM进入序列做了什么: 设置STM8复位 SWIM进入(4个长脉冲,4个短脉冲) 延迟6ms 发送SWIM通信重置(128 x HSI) 延迟3毫秒 将0xA0写入SWIM_CSR 延迟3毫秒 清除STM8重置 延迟7ms 停止STM8 - 在DM_CSR2中设置停顿位 延迟7ms 将0xA4写入SWIM_CSR 延迟7ms 解锁FLASH存储器(MASS序列)在FLASH_PUKR中写入0x56(0x5062) 那么FLASH_PUKR中的0xAE(0x5062) 这对我有用(但不是ST-Link的作用) 另外,由于我系统中其他设备的编程序列,我的代码将在编程之前进行块擦除。 以上来自于谷歌翻译 以下为原文 OK OK - I did say the whole thing is horrible. All I can do is tell you what I do for the SWIM entry sequence: Set STM8 reset SWIM entry ( 4 long pulses, 4 short pulses) delay 6ms Send SWIM Comms reset (128 x HSI) delay 3 ms write 0xA0 into SWIM_CSR delay 3 ms clear STM8 reset delay 7ms stall the STM8 - set stall bit in DM_CSR2 delay 7ms write 0xA4 to SWIM_CSR delay 7ms unlock FLASH memory (MASS sequence) Write 0x56 in FLASH_PUKR (0x5062) then 0xAE in FLASH_PUKR (0x5062) This works for me (but is not what the ST-Link does) Also, because the programming sequence for the other devices in my system, my code will do a block erase before the programming. |
|
|
|
很抱歉延迟回答但是我遇到了ADSL服务问题,我试着编写另一个相同类型的STM8,这次我还可以编写闪存程序存储器,这些存储器都使用我使用的代码以及更改你向我建议,所以我得出结论,第一台STM8有缺陷。
但是,在两周内我应该收到一个st-link并使用它来验证第一个stm8是否有故障。 问候 以上来自于谷歌翻译 以下为原文 Sorry for the delay in answering but I had problems with the ADSL service, I tried to program another STM8 of the same type and this time I could write also the flash program memory, both with the code that I used and also with the changes that you suggested to me, so I concluded that the first STM8 was defective. However, in two weeks I should receive an st-link and using that i will verify if the first stm8 is faulty or not. Regards |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2632 浏览 1 评论
3208 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1783 浏览 1 评论
3607 浏览 6 评论
5987 浏览 21 评论
939浏览 4评论
1315浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
582浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1302浏览 3评论
1357浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 05:58 , Processed in 1.100710 second(s), Total 83, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号