完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
亲爱的大家,
首先,我想感谢你给我的任何帮助。 我的目的是在uC中刷一个空代码,但它总是说“丢失了SWIM通信”。 在分析了我们自己设计的电路板之后,我说这个问题可能来自uC的NRST引脚。 在测试期间,只有一个冷凝器连接到此引脚: 但你可以看到信号NRST(如下所示)被拉出来应该是: 如果我拆下冷凝器,我在NRST引脚上有这个: 请问有人可以告诉我为什么在NRST引脚上有这个信号而没有任何事情发生?在我的暗示中,我应该有5V直接而没有任何事情发生;那么这个信号来自哪里? 我真的很期待一个答案或建议,因为我几周都找不到解决方案,也无法闪现任何程序。 先谢谢你, 叶大卫 #stm8 #nrst-pin#flash-writing 以上来自于谷歌翻译 以下为原文 Dear all, First I would like to thank you for any help that you might give me. My purpose is to flash an empty code in the uC but its always says ''lost SWIM communication''. After analyse of our self designed board, I remarked that the problem might come from the NRST pin of the uC. There is only a condensator connected to this pin during my test : But you can see that the signal NRST(shown below) is pulled as it should be : If I remove the condensator, I have this on the NRST pin : Please can someone tell me why I have this signal in the NRST pin while there is nothing going on? In my undersanding I should have 5V straight while nothing is happening; So where this signal comes from? I am really looking forward for an answer or advice as I can not find the solution since weeks and cannot flash any program. Thank you in advance, Ye David #stm8 #nrst-pin #flash-writing |
|
相关推荐
15个回答
|
|
|
亲爱的大家,
你好Max, 感谢您的答复。 实际上,我们观察到的信号与10nF的恒定时间相对应。 然而,“方形信号”是问题的根源,据我所知,改变公寓并不能解决这个问题。这是我们有100nF冷凝器时的信号: 通常,此NRST引脚应始终为VDD,因此为5v(当没有发生任何事情时)。我不明白为什么有一个方形信号。它是否试图一遍又一遍地重启? 据我所知,拥有这个方波信号意味着uC不断重启;然后闪烁程序是不可能的。 此外,我不认为问题来自GPIO配置,因为我尝试闪存的代码是空的! 先谢谢你, 问候, 叶大卫 以上来自于谷歌翻译 以下为原文 Dear all, Hello Max, Thank you for the reply. Indeed, the signal that we are observing correpond to the constant time for 10nF. Nevertheless, the ''square signal'' is the source of the problem and in my understanding, changing the condo will not solve this problem. Here is the signal when we have 100nF condensator : Normally, this NRST pin should always be at VDD,so 5v (when nothing is happening). I do not understand why there is a square signal instead. Is it trying to restart over and over? To my understanding, having this square signal means that uC is constantly restarting; then flashing program is impossible. Also, I do not think that the problem comes from the GPIO configuration because the code that I am trying to flash is empty ! Thank you in advance, Regards, Ye David |
|
|
|
|
|
如果您没有在MCU中放置有效代码,那么您所拥有的只是内存中无处不在的操作码...
换句话说,您必须在STM8中编写有效的东西,而不仅仅是空程序。 SWIM接口设计为在设备处于RESET状态时能够运行。 很抱歉,我没有提供此设备的代码。 但是 https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm8-embedded-software/stsw-stm8069.license%3d1523530181920.html 只有一个12Mb的包装并且包含许多你可以尝试的例子。如果你想与ST的某个人取得联系,我建议你联系当地的FAE。 您可以使用 http://www.st.com/content/st_com/en/contact-us.html 找到您附近的位置或询问您的经销商。 以上来自于谷歌翻译 以下为原文 If you don't put a valid code in the MCU, all you have is invalid opcodes everywhere in memory... In other words, you must program something valid in the STM8, not just an empty program. The SWIM interface was designed to be able operate when the device is under RESET. I am sorry I don't have code to provide for this device. But the https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm8-embedded-software/stsw-stm8069.license%3d1523530181920.html is only a 12Mb package and contains many examples you can try.If you want to get in touch with someone from ST, I recommend you contact your local FAE. you can use http://www.st.com/content/st_com/en/contact-us.html to find a location close to you or ask your distributor. |
|
|
|
|
|
嗨Max,
当器件处于复位状态时,SWIM接口不工作。只有一个“入口”的东西,但一旦完成,设备必须从重置中释放。这就是问题所在。如果设备(cpu)快速执行一件坏事,它会快速重置并且你意识到你没有时间停止cpu并开始flash编程...... 这个SWIM界面设计相当糟糕。游泳控制器应该能够在重置时真正运行cpu并且能够独立地访问闪存控制器,并且芯片处于复位状态。但这些都是梦想。 现实情况是,您可以轻松地对芯片进行打砖。 ST给出了一个理论,你可以用十分之一的尝试来抓住一个砖块芯片......我不知道它是否属实,但我承认我曾经多次尝试挽救了一些筹码。 ST-Link加密狗做了一个小技巧:保持低位复位线,并建议您同时切换功率。然后,再试一次。上电复位,复位线已经很低,可能会有所帮助。 对于大卫:我担心你有一块砖块,一块可以快速复位的芯片。您可以尝试使用此过程对其进行编程:使用ST-Link。建议您切换电源时,请执行此操作。并继续尝试编程。如果你很顽固,你可能会成功...... 某些东西可能是任何有效的程序。 例如,一个有效的C程序就是这个: void main(void){while(1){}} 祝你好运! 以上来自于谷歌翻译 以下为原文 Hi Max, The SWIM interface does NOT operate when the device is under reset. There is only an 'entry' thing, but once it is done, the device must be released from reset. And that is the catch. If the device (cpu) performs a bad thing fast, it resets itself fast and you realize you don't have time to stall the cpu and begin the flash programming... It is quite a bad design this SWIM interface. The swim controller should have been able to really run with the cpu under reset and be able to access the flash controller (at least) independently, and with the chip under reset. But these are dreams. The reality is that you can brick the chip easily. ST gives a theory that you can catch a bricked chip with one in ten tryings... I don't know if it's true but I admit I managed to rescue some chips a couple of time with repeated tryings. ST-Link dongles do a little trick: keeps the reset line low, and advices you to toggle the power in the mean time. And then, try again. Probably a power-on reset, with the reset line low already, helps. For David: I'm afraid you have a bricked chip, one that resets itself very fast. You can try to program something on it with this procedure: use a ST-Link. When it advices you to toggle the power, do it. And keep trying programming it. If you are stubborn, you may succeed... Something may be any valid program. A valid C program for example is just this one: void main(void) { while(1) {} } Good luck! |
|
|
|
|
|
|
|
|
|
|
|
新芯片从未发生过(但我只使用STM8S变体)。
我了解你在IDE下编程芯片? IDE会建议您随时切换/循环/关闭电源吗?如果不是,请尝试STVP('ST Visual Programmer')。这是他们的原始工具,我用它来解决这些紧急问题。它看起来很古老,但它设法为我救了一些筹码。 祝你好运! 以上来自于谷歌翻译 以下为原文 Never occured to me with new chips (but I only use STM8S variants). I understand you program the chip under the IDE? Do the IDE advices you to toggle/cycle/turn off-turn on the power at any moment? If no, try the STVP ('ST Visual Programmer'). It's their original tool and I use it for such emergency problems. It looks ancient but it managed to rescue some chips for me. Good luck! |
|
|
|
|
|
德拉戈米尔,
是的,我的IDE要求我重新启动电源等。 - 谢谢你的提示。 我下载了STVP并使用HEX文件来刷新程序。 不幸的是,同样的问题发生无法与设备进行通信: 问题是Microchip不断切换NRST引脚(屏幕截图位于原始帖子中)。 知道我准备了最简单的电路和不同的芯片,怎么可能仍然有这个相同的问题。 我真的很期待找到解决方案。 提前感谢您的帮助, 叶大卫 以上来自于谷歌翻译 以下为原文 Dragomir, -Yes, my IDE was asking me to reboot power supply and etc.. -Thank for the tip. I downloaded the STVP and used the HEX file to flash the program. Unfortunately, same problem occurs. The communication with the device is not possible : The problem is that the Microchip is constantly toggling the NRST pin (screenshot are in the original post). How can it be possible to still have this same issue knowing that I prepared the most simple circuit and with differents chip. I am really looking forward to find the solution. Thank in advance for the help, YE David |
|
|
|
|
|
当您从屏幕截图到达状态STVP时:
- 拔下电路板以确保不再提供MCU - 强制RESET为低电平并保持低电平 - 在不释放RESET的情况下应用电源 - 现在单击消息窗口上的按钮 - 然后才释放RESET 如果您成功连接,请确保首先执行全局擦除 以上来自于谷歌翻译 以下为原文 When you reach the state STVP from your screenshot: - unplug you board to make sure the MCU is not supplied anymore - force the RESET low and keep it low - apply the supply without releasing the RESET - now click the button on the message window - then and only then release the RESET If you succeed to connect that way, make sure to perform a global erase first |
|
|
|
|
|
你好,
我认为重置不断切换是选项字节未补充的标志,有些选项需要补充,否则会产生复位。 在复位变为高电平后,mcu检查选项字节,如果没有补充,则为了安全性而重置自身,然后在复位高电平后再次检查,依此类推...... 因此,唯一的方法是连接和重新编程选项字节以避免这种情况。 您是否将复位引脚连接到STLink? 如果由于无法连接到设备而无法检查选项,也许您可以尝试使用引导加载程序? RGDS, 洛朗 以上来自于谷歌翻译 以下为原文 Hello, I think the reset constantly toggling is a sign of option bytes not complemented, some options needs to be complemented otherwise a reset is generated. After reset going high, the mcu checks the options bytes and if not complemented it resets itself for security, then after reset high, it checks again and so on... So, the only way is to connect and reprogram option bytes to avoid this. Do you connect the reset pin to the STLink ? If impossible to check the options because you can't connect to the device, maybe you can try with the bootloader ? Rgds, Laurent |
|
|
|
|
|
嗨洛朗,
复位引脚连接到STLink。 VCC,GND和DATA引脚相同。 你能帮我理解一下bootloader是如何工作的吗? 我不熟悉这种闪存程序的方法,因为我每次使用IDE都会这样做。 它是一个我必须下载和使用而不是IDE的软件吗? 谢谢您的帮助! 叶大卫 以上来自于谷歌翻译 以下为原文 Hi Laurent, The reset pin is connected to the STLink. Same for the VCC,GND and DATA pins. Can you help me understand how does a bootloader works? I am not familiarised with this method of flashing program as I use IDE every time to do it. Is it a software that I have to download and use instead of the IDE? Thanks for the help! YE David |
|
|
|
|
|
你好Max,
我非常仔细地做了很多次这个过程,但是STVP仍然有连接SWIM的问题。 如果这是此复制的结果,则应完成全局重置。 也许uC的复位参数不正确,正如Laurent所说,没有实现选项字节导致MCU不断复位? 非常感谢, 叶大卫 以上来自于谷歌翻译 以下为原文 Hello Max, I did this process very carefully and many times but the STVP still have problem to connect the SWIM. The global reset should be done if this is the result of this manupilation. Maybe that the reset parameter of the uC are not correct and as Laurent says below, option bytes are not implemented which lead to constant reset of the MCU? Many thanks, YE David |
|
|
|
|
|
你是否将VDD连接到VDDIO引脚?
你是否将VSS连接到VSSIO引脚? 您是否在VCAP引脚和VSS之间连接了一个外部电容(470nF-3300nF)? 以上来自于谷歌翻译 以下为原文 Did you connect VDD to the VDDIO pin(s)? Did you connect VSS to the VSSIO pin(s)? Did you connect an external capacitor (470nF-3300nF) between the VCAP pin and VSS? |
|
|
|
|
|
嗨蒂姆,
谢谢你的回复。 是VDD和VDDIO也连接,VSS和VSSIO也是如此。还有一个外部电容VCAP-VSS,为1uF。 下面,您可以看到我如何连接闪存代码; PCB仅包含VDD和VSS,NRST引脚和VCAP的公寓。 (不要在乎黑线,它没有连接) 你有关于这种联系的任何建议吗? 最好的祝福, 叶大卫 以上来自于谷歌翻译 以下为原文 Hi Tim, Thank for the reply. Yes VDD and VDDIOs are connected, VSS and VSSIOs as well. There is also a external capacitors VCAP-VSS which is 1uF. Below, you can see how I connect to flash the code; The PCB contains only the condos for the VDDs et VSSs, NRST pin and for VCAP. (Don't care about the black wire, it is not connected) Do you have any suggestion about this connection? Best regards, YE David |
|
|
|
|
|
引导加载程序使用设备UART重新编程设备。
它基于嵌入在设备系统内存中的小程序。 见解释 http://www.st.com/content/ccc/resource/technical/document/user_manual/e4/83/c1/d6/ee/d8/49/b8/CD00201192.pdf/files/CD00201192.pdf/jcr:内容/翻译/ en.CD00201192.pdf 和编程工具http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm8-software-development-tools/stm8-programmers/flasher-stm8.html 。根据STM8器件,器件系统存储器中的引导加载程序代码可能支持其他通信接口(CAN,LIN,SPI ......),但UART是唯一受支持的通信接口。 http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm8-software-development-tools/stm8-programmers/flasher-stm8.html 工具。 以上来自于谷歌翻译 以下为原文 The bootloader uses the device UART to reprogram the device. It is based on a small program embedded in the device system memory. See explanation in http://www.st.com/content/ccc/resource/technical/document/user_manual/e4/83/c1/d6/ee/d8/49/b8/CD00201192.pdf/files/CD00201192.pdf/jcr:content/translations/en.CD00201192.pdf and the programming tool http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm8-software-development-tools/stm8-programmers/flasher-stm8.html .Depending on the STM8 device, the bootloader code in the device system memory may supports other communication interfaces (CAN, LIN, SPI...) but the UART is the only one supported by the http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm8-software-development-tools/stm8-programmers/flasher-stm8.html tool. |
|
|
|
|
|
你好,
我首先回答关于bootloader的上一个问题,找一下关于STM8 bootloader的UM0560。 软连接是'Flash loader demonstrator'。 我看到你正在使用Rlink探测器,你能告诉我们你设置了哪个跳线或它们在哪一侧? 您可以尝试使用STLink以SWIM模式连接吗? RGDS, 洛朗 以上来自于谷歌翻译 以下为原文 Hello, I answer first on previous question about bootloader, look for UM0560 about STM8 bootloader. The soft to connect is 'Flash loader demonstrator'. I see that you're using Rlink probe, can you tell us which jumper you set or on which side they are ? Can you try to connect in SWIM mode with an STLink ? Rgds, Laurent |
|
|
|
|
|
劳伦特你好,
由于你的评论我们终于解决了这个问题。 一切都来自一个误解。 Vcap出现在电气原理图设计中,但不在我们的SMT机器编程文件中。 使用Raisonnance Rlink或STVP RT-link,闪烁工作正常。 致以真诚的感谢和诚挚的问候, 大卫 以上来自于谷歌翻译 以下为原文 Hello Laurent, We finally resolved the problem thanks to your comment. All came from one misunderstanding. The Vcap was present on the electrical schematic design but not in our SMT machine programming files. The flashing is working properly either with Raisonnance Rlink or with STVP RT-link. Many thanks and best regards, David |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1472 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1524 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3674 浏览 1 评论
3864 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2483 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
752浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
685浏览 5评论
730浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
977浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
780浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-15 03:30 , Processed in 2.782520 second(s), Total 101, Slave 84 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
451