搜索
bottom↓
回复: 17

(以解决,下载最新pc端程序后,所有的片子都行了)初用stm32遭遇尴尬,串口isp下载挑芯片

[复制链接]

出0入0汤圆

发表于 2008-5-25 09:58:23 | 显示全部楼层 |阅读模式
最新版软件下载地址
http://62.193.238.133/modules/Splatt_Forums/downloadtemp/Setup-v1.1-alpha.zip
开始用的上位机软件是很久以前下载的v1.0,上面是v1.1,变化较大,但说实话,还是不尽人意

-----------------------------------
开始用的是max3232,土灰色字,能认出芯片id,但后边的所有操作均失败
恰好刚做好一个232-》usb的板子,结果一切正常
怀疑是电源有问题,因为232-》usb的板子是usb供电的,加入大电容等无果
奋斗了一个晚上后,没解决,睡觉
今早起来将max3232换成max202,一切正常,拆掉后加的电容等,还是正常
于是,找来手头有的另外两种max232,一种与开始那片max3232一样土灰色字,结果现象一样,只能认出id,后边均出错
另外一种是白字的,一切正常
供电电压均为3.3v
仔细看编号
max3232cpe :0434马来西亚,土灰字,出错
max232cpe :0215马来西亚,土灰字,出错

max202cpe :0516马来西亚,土灰字,正常
max232cpe :0017菲律宾,白字,正常

从编号上我是没看出什么来,那块max3232cpe以前一直在用,很正常。

从现象来看,出错的片子开始都是可以与mcu通信的,因为可以认出id,但是后边的操作,擦除,下载等均出错,这个我没法理解,
难道这些操作需要较大的电流,造成电源不稳?
我也试过将串口模块的供电直接接在输入的5v上,也不行
在串口供电处串接电阻用来滤波,不行

我最不能理解的是,这个
max232cpe :0017菲律宾,白字
都能用,但是那个max3232cpe却不行,这个片子应该不是假的,是我几年前花了12/p在本地一个正规商家买的。

还有我的max232边上那四个电容用的是1uf无极性,该不会是这个问题吧,等回家换成10uf的试试

还有那个上位机软件,编的实在是,令人抓狂

阿莫论坛20周年了!感谢大家的支持与爱护!!

曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……

出10入120汤圆

发表于 2008-5-25 10:13:55 | 显示全部楼层
呵呵,这个俺到也没发现,用了多少批的MAX232(还是5V的呢)也没发现问题,楼主是不是查一下电路是不是稳定性不好?

出0入50汤圆

发表于 2008-5-25 10:26:07 | 显示全部楼层
MAX的芯片假的太多,我最近到市场里零买的MAX485CSA做的板子给客户测试经常不稳定,晕啊,正在等批量的板子出来给用户测试了。

出0入0汤圆

 楼主| 发表于 2008-5-25 10:28:04 | 显示全部楼层
唉,刚在baidu搜了一下
http://62.193.238.133/forums-cat-6284-23.html,这人似乎与我遇到同样的问题
我用上面提供的那个stm32boot.exe,是命令行模式,换了所有芯片,似乎都好使
看来,不是挑芯片,而是st的那个软件挑机器

这是地址
http://dalewheat.com/STM32boot/stm32boot.exe

一楼或是哪位大虾有空有条件能测试一下吗,多谢了


下面是那个帖子全文
command line boot loader utility available?


Moderated by :   ?  STOne-32


Author beginning argument    ( Replies received: 8 )
dale   Posted 27-01-2008 at 18:45   



Registered on :
01-11-2008

Messages : 18

OFF-Line

Has anyone seen a command line version of the flash bootloader? If not, would anyone be interested in something like this? I'm finding the Windows application a bit cumbersome for repeated usage.

Thanks,

Dale Wheat







Profile   Quote   
STOne-32   Posted 28-01-2008 at 11:55   





Registered on :
05-29-2007

From STMicroelectronics

Messages : 226

OFF-Line

Hi dale,

The bootloader version is sent in the get ID command. Could you please detail what do you mean by "bit cumbersome for repeated usage" ? and if possible to give some enhancements we can highlight to ST to implement. Thx,

STOne-32.








Profile   www   Quote   
dale   Posted 28-01-2008 at 17:05   



Registered on :
01-11-2008

Messages : 18

OFF-Line

STOne-32,

By 'version', I meant a different PC application that would run from the command line with all of its parameters included, and not the version of the bootloader installed on the chip.

The Windows GUI version works just fine, but I use what can best be called an "empirical method" of software development: make a tiny change, compile, download, test. This is repeated hundreds of times (yes, hundreds) a day. Here are the steps that I must follow to accomplish the "download" portion of the cycle:

[First time]

1. Start the "Flash loader demonstrator (v1.0)" program. I am greeted by the Butterfly Girl.
2. Click the "Next >" button, because I am done reading about the Flash loader demonstrator (v1.0).
3. Here I am presented with all the communication options. To save time, I rearranged all my serial cables so that I could use "COM1" (the default) without having to change it to "COM2" or whatever every time I start the program. To save even more time, I change the "Timeout(s)" from the default of "5" to "1", because if it's not going to work the first time, it's generally not going to work subsequently. This takes six mouse clicks to change from "5" to "1". When I am satisfied, I click the "Next >" button again, hoping that I have remembered to power up the STM3210B-EVAL and set the BOOT0/BOOT1 switches properly and press the reset button. If not, I do so at this time.
4. If all goes well, I am presented with the "target selection" page. I find everything to my satisfaction so I click the "Next >" button to continue.
5. Now I see the "requested operation and related parameters" page. "Erase" is the default operation. I change this to "Download".
6. I click the "..." browse button and find my image file. The program's recollection of previously selected files and subdirectories is puzzling to me. The first time I run the program after turning on my PC, it begins browsing in the "My Documents" folder, which sort of makes sense. If I select a file for downloading from another folder, then subsequently close the application and then re-open it, it (or Windows) seems to retain the location of the folder correctly. It would be nice to have it consistently remember the location of at least the last file selected for download.
7. I changed my project's default output file type from Intel HEX (*.hex) to binary (*.bin) to save yet more mouse clicks, as "*.bin" is the default file type offered by the "Open" dialog box. I select my output file for downloading.
8. I select the "Verify" option.
9. I select the "Jump to the user program" option rather than change the BOOT* switches and reset the board every time. This is a nice option.
10. I cross my fingers for good luck and click the "Next >" button. The code usually gets programmed into the chip. Sometimes it doesn't, and the only explanation I get is that the "operation failed".

OK, that describes the first time. Now that it's all set up, I can use the following steps to repeat the download process without having to start from the beginning:

[Subsequent times]

1. Click on already opened "Flash loader demonstrator (v1.0)" application.
2. Click on the "< Back" button three (3) times.
3. Wait for the program to do whatever it does between the "requested operation page" and the "target selection page" when going backwards. Perhaps it is reloading and parsing the "Flash mapping" grid control contents? This takes 3-4 seconds on my computer (2.4GHz Intel, 1GB RAM).
4. When I can confirm that the "communication port page" is being displayed, I press the reset button on the STM3210B-EVAL board to return the chip to bootloader mode. I generally leave the BOOT* switches in the downloader position (BOOT0=1, BOOT1=0). By now I don't even look; I know what they are supposed to feel like.
5. When I see that the LCD backlight is illuminated (the first thing my programs do is to turn this output off) I know that the part is back in bootloader mode.
6. I click the "Next >" button three (3) times to breeze through the already-populated pages and start the actual download process. If all goes well, I get the green progress bar and my application starts.

So you can see that my "optimized" usage of the Flash loader demonstrator (v1.0) saves me four (4) steps.

In contrast, I have, in the past, used command line applications that took all their parameters up front and could be invoked from a makefile. I would type "make" to recompile my source files and see if I made any sort of syntactical errors then, upon successful completion of that step, I would type "make prog" which would send my newly-minted bytes to the chip and restart it for me. This is faster and more convenient.

These command line utilities presently exist for the AVR, NXP's LPC21xx parts (lpc21isp), Luminary Micro's LM3S series (LMFlash.exe) and the STM32 if you are using Raissonance's RLink (Cortex-pgm.exe). The AVR and LPC software is open source and cross-platform.

I hope I have made my point clearer. I did not mean to impugn the quality or usefulness of the ST product in any way.


Thanks,

Dale Wheat







Profile   Quote   
togrady   Posted 30-01-2008 at 22:24   



Registered on :
12-07-2008

Messages : 26

OFF-Line

I agree with Dale.
Also, for production where you want to run many programming sessions at the same time a command line version that runs from a batch file would be invaluable.

Maybe the existing GUI type tool could be made work from a command line? I always make my GUI programs work in this way -- and always return a result so that a batch file can know if it worked or not. It is usually very little extra work.






Profile   Quote   
Squonk   Posted 30-01-2008 at 23:45   



Registered on :
10-15-2006

From Germany

Messages : 32

OFF-Line

I also agree with Dale and togrady. I made a command line programming tool for an ST10. This one is being used in production, development and in the field. For production and development it is used via command line and for "dumb" customers in field it is used via GUI.

Regards

Squonk






Profile   Quote   
togrady   Posted 06-04-2008 at 01:27   



Registered on :
12-07-2008

Messages : 26

OFF-Line

As I get nearer to my project going into mass production I still do not know how it will be programmed in production. What are people using for production programming? Surely not the ST flash loader or I'll have to buy the production people lots of mice as they'll wear out the buttons  

Have ST made the protocol public yet? If so I'd consider writing a command line loader that could be run from a batch file (in production).

Regards
Trevor






Profile   Quote   
paul.archer   Posted 07-04-2008 at 07:30   



Registered on :
03-10-2008

Messages : 6

OFF-Line

The protocol has been documented at
http://www.st.com/mcu/familiesdocs-110.html
"AN2606" or can be found at http://www.st.com/stonline/products/literature/an/13801.pdf

Another alternative for programming the device is via JTAG.






Profile   Quote   
togrady   Posted 08-04-2008 at 00:15   



Registered on :
12-07-2008

Messages : 26

OFF-Line

Thanks Paul for this -- I never knew it has been published. I can't rely on JTAG as it will not be in the final production version.

I'll probably implement a command line version in a few weeks. I'd be happy to share it and/or make open source. It will be windows only unless others get involved.

Regards
Trevor






Profile   Quote   
dale   Posted 08-04-2008 at 05:11   



Registered on :
01-11-2008

Messages : 18

OFF-Line

Trevor,

You're welcome to use this to help get you started. I got it as far as identifying and programming parts but haven't finished all the options that I originally had in mind for it.

dalewheat.com/STM32boot/main.c

It's very Windows-specific at this point. It should not be hard for a clever unix-programmer to convert to some other platform.

I used Dev-C++ and GCC to compile it. A Windows binary is located here:

dalewheat.com/STM32boot/stm32boot.exe

Use at your own risk. It's not my fault if you blow stuff up with it.


Thanks,

Dale

出50入0汤圆

发表于 2008-5-25 11:52:56 | 显示全部楼层
我的反正要用手摸地才可以,不摸地死活连不上,摸了地连接很快,下载擦除也很快

出0入0汤圆

 楼主| 发表于 2008-5-25 12:39:16 | 显示全部楼层
呵呵,我与楼上相反,我的如果用手摸vcc的话,偶尔可以成功
你可以试试我3楼说的的那个dos版,试了一下,很好用,而且它只要复位时boot0是1就行了,而st那个始终都要接vcc,而我的电路里用的是按钮...

出0入0汤圆

发表于 2008-5-25 19:52:42 | 显示全部楼层
有这么奇怪的

出0入0汤圆

 楼主| 发表于 2008-5-26 09:59:01 | 显示全部楼层
遇到这问题的还不少
http://62.193.238.133/forums-cat-6714-23.html&start=0
他们版主发布的官方dos版
http://www.st.com/mcu/forums-cat-6720-23.html&start=10

看来是软件使芯片意外地跳出了bl

出0入0汤圆

发表于 2008-5-30 15:48:23 | 显示全部楼层
三楼这个http://dalewheat.com/STM32boot/stm32boot.exe 我试了,很稳定,但不能加密芯片(ENABLE READ PROTECT)啊!

出0入0汤圆

发表于 2008-5-30 15:52:41 | 显示全部楼层
加密芯片用这个可以(http://62.193.238.133/modules/Splatt_Forums/downloadtemp/Setup-v1.1-alpha.zip )
但难道我先用stm32boot.exe 烧程序,然后用Setup-v1.1-alpha.zip 来加密,要分两步,好麻烦啊!

出0入0汤圆

发表于 2008-6-3 08:59:40 | 显示全部楼层
呵呵,stm32boot提供源码,我把源码改了一下,让它在最后把加密的步骤也做了,上传给大家试试看

点击此处下载 ourdev_299854.rar(文件大小:19K) (原文件名:stm32boot20080603.rar)

出0入0汤圆

 楼主| 发表于 2008-6-3 10:01:11 | 显示全部楼层
请问楼上,你是改成自动的么,不能选择是否加密的?

出0入0汤圆

发表于 2008-6-3 10:13:44 | 显示全部楼层
是自动加密的,不能选择是否加密,如果不要加密,你用回原装那个就可以了

出0入0汤圆

发表于 2008-6-5 13:55:23 | 显示全部楼层
用1.0版本跟楼主情况差不多,换成1.1一切ok

出0入0汤圆

发表于 2008-7-5 16:12:25 | 显示全部楼层
max3232cpe ,max232cpe也改为5V供电 不行来找我
老问题了早就发现了 所有的3.3V供电的232芯片都比较不稳定
无论是SP的还是MAX的

出0入0汤圆

发表于 2008-8-11 12:15:57 | 显示全部楼层
以下蓝色文字由版主:bluelucky 于:2008-08-11,12:15:57 加入。
<font color=black>请发贴人注意:
本贴放在这分区不合适,即将移走
原来分区:[1032]ARM技术论坛
即将移去的分区:[3011]Cortex-M3技术讨论区
移动执行时间:自本贴发表0小时后

任何的疑问或咨询,请可随时联系站长。谢谢你的支持!
</font>

出0入0汤圆

发表于 2010-9-16 12:00:24 | 显示全部楼层
关注@

出0入0汤圆

发表于 2010-9-16 12:14:12 | 显示全部楼层
MAX232只买2块以下的,型号要求是MAX232CPE,供电在3V3到+5V,从来都没有出过问题。
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-8-25 12:12

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表