cancel
Showing results for 
Search instead for 
Did you mean: 

Urge_for_help

gzxfhuang
Associate II
Posted on March 02, 2008 at 13:36

Urge_for_help

4 REPLIES 4
gzxfhuang
Associate II
Posted on May 17, 2011 at 12:25

Hi,

I was attracted by the excellent STM32 and changed my product to it, but I can't flash it!

I got 48pin STM32F101C8T6. I can run my program in SRAM with Ulink, but can't write the related program to flash with Ulink or Boot loader.

Test conditions:

MCU only power on with LDO HT7333 and add the power capacitors around MPU, not other devices connected. While using Ulink, Boot0 and Boot1 float. While using Boot loader, Boot0 10K pull up to 3.3V and Boot1 short to Gnd.

Processing:

Ulink:

Debugger as ''ULINK Cortex Debugger'', showed :

2 JTAG Device Chain:

'' 0x3BA00477, ARM Cortex-M3, 4'',

'' 0x16410041, Unknown JTAG device, 5''

I can use the dubugger to debug my small gpio and uart programs running in SRAM, but can't write the related programs to Flash!

My steps:

1.''Flash'' -> ''configure flash tools'' -> (ULINK Cortex Debugger)''Settings'' -> ''Add'' -> (STM32F10x128KB Flash) -> ''OK''

2. ''Flash'' -> ''Erase'' : showed Erase done.

3. ''Flash'' -> ''Download'' :

showed ''too many errors'' : verify no byte has been written.

Could someone give me a clue for the problems ?

Boot loader:

Use window's Flash_loader unzipped from ''UM0462'' to connect my MPU through its UART1, it show PID 0(06410041) and Version (2.0), select ''STM32F10xx8xx'' and to ''Erase''/''Download''/''Upload'', problems happened:

1. Erase :

If I erase ''All'' pages, it always comes out fail, if I only erase several pages( less than 20), it always comes out successful, but I upload the related page in HEX file, almost no FF inside. If I select more pages to erase, it always comes fail.

2. Download:

Always fail even it's a very small program. It can't count more than 6 bytes.

3. Upload:

Problems similar as ''Erase'', only successful for several pages, no more pages.

IS it possible that my MPU were broken? but I tried 3 of them with the similar problems. Can somebody help?

[ This message was edited by: gzxfhuang on 01-03-2008 19:03 ]

16-32micros
Associate III
Posted on May 17, 2011 at 12:25

Hi gzxfhuang,

May be you have enabled Flash protection either in Read or Write for some pages accidently. Could you please check this ? If it is the case, you should disable this protection by having a program running from RAM. Hope this helps you 🙂

Cheers, STOne-32

gzxfhuang
Associate II
Posted on May 17, 2011 at 12:25

Hi STOne-32,

Thank you very much for your help. It's quite possible I got the chips with protection.

It seems I need some time to understand the PM0042, and write codes to disable the protection. Maybe, I could use the AN2606? Send a ''Write Unprotect(0x73)'' command or ''Readout Unprotect(0x92)'' command? Questions:

1. Does ST provide some tools for the flash protection/Unprotection? (Boot_loader(UM0462) only set the protection)?

2. Or I need to write my own tools to realize the commands in the AN2606 ? Is there the timeout limited for the command protocol? otherwise I can use some uart common tools to implement these commands?

Regards

Mark

gzxfhuang
Associate II
Posted on May 17, 2011 at 12:25

I checked the Memories by ulink. result as following:

0x40022000 : 30 00 00 00 00 00 00 00

0x40022008 : 00 00 00 00 00 00 00 00

0x40022010 : 80 00 00 00 00 00 00 00

0x40022018 : 00 00 00 00 FC FF FF 03

0X40022020 : FF FF FF FF 00 00 00 00

seems nothing wrong?

[This time Boot0=1 & Boot1=0 ]