你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

stm8s001烧录程序后,掉电会自动擦除程序,并且iar无法烧录

[复制链接]
yseven7 提问时间:2019-9-22 23:39 /
悬赏4ST金币已解决
1.初学stm8s001,由于文件太大,编译不过,所以在IAR options/C++ compiler/level设置High,发现掉电后串口会吐出0x00,大概过3s后才会重新启动
2.之后把IAR options/C++ compiler/level改回low,烧写其他程序,还是如此。
3.用IAR project/dowmload/erase memory 擦除程序,未成功,导致芯片锁掉
4.用STVP /option byte/read out protection ON/OFF一次之后,可以用stvp烧录简单LED程序,但是断电之后led灯不闪烁了
5.用STVP烧录串口程序,会烧录失败
       Error : Cannot communicate with the device !
               Check the SWIM cable connection and check all the needed pin connections on the SWIM connector.

                If the application code uses Swim Disable and Reset pin as Output or has disabled SWIM Clock Divider:
                Try Now to SWITCH OFF and ON the application Power Supply while NRST Reset pin is forced low.

       Error : < PROGRAM MEMORY verifying failed.

6. 用iar烧录所有程序(之前可以烧录的程序),都会失败。
                   Failed to initialize communication with hardware: SWIM error [30200]: ST-Link connection error
                   IAR Embedded Workbench 3.10.1 (D:\Program Files\IRA Embedded\install\stm8\bin\stm8proc.dll)




求论坛大神帮忙解答。


最佳答案

查看完整内容

编译器问题1:烧录工具无法正常连接 Thu Sep 19, 2019 16:19:03: Failed to initialize communication with hardware: SWIM error [30200]: ST-Link connection error 解决办法: 1.查一下烧录器硬件的连接 2.打开计算机->管理->设备管理器,查一下STM32USB口的属性 如果还是无法烧录,把ST-Link的烧录器拔掉重新插上,这个问题可能是ST-Link ...
收藏 评论6 发布时间:2019-9-22 23:39

举报

6个回答
踮起脚摘苹果 回答时间:2019-9-22 23:39:27
编译器问题1:烧录工具无法正常连接
        Thu Sep 19, 2019 16:19:03: Failed to initialize communication with hardware:
        SWIM error [30200]: ST-Link connection error
        
        
        
        解决办法:
        1.查一下烧录器硬件的连接
        2.打开计算机->管理->设备管理器,查一下STM32USB口的属性
        如果还是无法烧录,把ST-Link的烧录器拔掉重新插上,这个问题可能是ST-Link
        之前烧过其他的程序
        
        
编译器问题2:打开IAR如果无法烧录,查一下这两处问题:
                解决办法:Project -> Option -> General Options -> Target
                Code:选择Small
                Data:选择Medium
               
                Project -> Option -> C/C++ Compiler ->  Preprocessor
                在Addtional include directoriesone per line)中添加头文件路径
               
                如果还是无法烧录,把ST-Link的烧录器拔掉重新插上,这个问题可能是ST-Link
                之前烧过其他的程序
               
               
Compiler Problem 3:
        编译器无法go to define处:
        
        
        Solution:
                插上烧录器编译无误全速运行,然后就可以跳转到define



解决IAR编译器内存容量不够的问题
                Error[Lp011]: section placement failed: unable to allocate space
                for sections/blocks with a total estimated minimum size of 0x2298
                bytes in <[0x008000-0x009fff]> (total  uncommitted space 0x1f80).
                Error while running Linker   
        Solution:
                把Option--C/C++ compile--Optimizations中的Level选为High就好了
yseven7 回答时间:2019-9-23 10:40:13
经测试程序没有被擦除,可以读出来,但是断电后重新上电不能正常工作。更换芯片还是如此,求解。
yseven7 回答时间:2019-9-23 14:02:15
第6步问题原因是同时打开了STVP和IAR,导致IAR烧录失败。
yseven7 回答时间:2019-9-23 14:04:04
第4步问题暂不明确,但是重新安装IAR软件后,可以正常使用。
butterflyspring 回答时间:2019-9-29 18:32:36
检查一下上电过程吧。包括VDD, RESET. VCAP是否正常。用示波器看看有没有异常信号
qytcs 回答时间:2019-10-8 09:05:41
S001的SWIM口复用  要在程序开始前有5S 的延时

所属标签

相似问题

关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版