1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好。
我使用STM8S001J3时遇到问题。 由于SWIM引脚设置为输出,因此无法下载程序。 有没有办法恢复设置? 我正在使用STVD和IAR进行程序开发。 #stm8#stm8s 以上来自于谷歌翻译 以下为原文 Hi. I have a problem using STM8S001J3. The program can not be downloaded because the SWIM pin is set to output. Is there a way to revert the settings? I am using STVD and IAR for program development. #stm8 #stm8s |
|
相关推荐
3个回答
|
|
你好Sang hyeon Jeong,
将SWIM引脚配置为输出后,将无法再与MCU建立SWIM通信。 当STM8器件处于复位状态时,SWIM引脚的默认状态保持不变。因此,当MCU处于复位状态时,通过控制复位引脚仍然可以使用SWIM。不幸的是,对于STM8S001,您无法使用此解决方案,因为没有复位引脚。 在您的情况下,STM8S001具有活动的SWIM引脚的时间仍然非常短。这是在POR(上电复位)期间以及代码执行期间的短时间内,直到应用程序将SWIM引脚重新配置为输出。但这个时间段很短。因此,唯一能从根本上解决这个问题的解决方案是定制的SWIM编程器,从电源电压连接到MCU的那一刻起,它将继续向STM8S001发送SWIM初始句子。这可能允许MCU在SWIM处于活动状态时的瞬间接收SWIM命令。 为了避免将来出现这个问题,我建议使用下面列出的两种解决方案之一: 1.添加几秒延迟作为MCU执行的第一个代码。这是我们的文档推荐的。 2.要实现简单的UART通信,在接收到特定模式的UART数据后,MCU会将SWIM引脚重新配置回其原始配置。 问候 Szymon 以上来自于谷歌翻译 以下为原文 Hello Sang hyeon Jeong, Once SWIM pin is configured as output, it is no longer possible to establish SWIM communication with MCU. Default state of SWIM pin is remained when STM8 device is in reset state. As a result it is still possible to use SWIM when MCU is in reset state by controling reset pin. Unfortuantely for STM8S001 you can't use this solution, because there is no reset pin. In your case there is still a very short time when STM8S001 has active SWIM pin. This is during POR (Power On Reset) and also for a short while during code execution, until application reconfigures SWIM pin to output. But this time slot is very short. So the only solution, which teoretically could help here is a custom SWIM programmer, which would keep sending SWIM initial sentence to STM8S001 starting from the moment, when supply voltage is attached to MCU. This would probably allow MCU to receive a SWIM command in moment of time, when SWIM is active. To avoid this problem in future I would propose using one of the two solutions listed below: 1. To add few seconds of delay as a first code executed by MCU. This is recommended by our documentation. 2. To implement simple UART communication in a way that after receiving specific pattern of UART data MCU will reconfigure SWIM pin back to its original configuration. Regards Szymon |
|
|
|
谢谢你的答案。
您的意思是,一旦您收到特定的UART数据模式,您可以再次与SWIM进行通信吗? 那么UART数据的具体模式是什么? 以上来自于谷歌翻译 以下为原文 Thank you for answer. Do you mean that once you receive a specific pattern of UART data, you can communicate with SWIM again? So what is the specific pattern of UART data? |
|
|
|
嗨,
是的,我的意思是这个解决方案,但请注意,这只是一个提示。因此MCU内部没有固件来实现它。用户必须在他的应用程序中添加代码。 问候 Szymon 以上来自于谷歌翻译 以下为原文 Hi, Yes, I mean this solution, but please note that it is just a hint. So there is no firmware inside MCU, which implements it.The code has to be added by user in his application. Regards Szymon |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2720 浏览 1 评论
3236 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1807 浏览 1 评论
3645 浏览 6 评论
6033 浏览 21 评论
1334浏览 4评论
209浏览 3评论
196浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
350浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
442浏览 2评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 15:07 , Processed in 0.978409 second(s), Total 50, Slave 44 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号