2013-02-10 11:52 PM
Hi all,
up to now I used a MSWindows bootloader application (based on Dale Wheats code) for the STM32F1. Now I also use the STM32F4. I updated the bootloader due to the different erase commands (erase vs. extended erase). Now I can identify and erase the STM32. But if I want to write to the flash by issuing the 'Write Memory Command' (0x31) I always get back NACK. Read/write protection is disabled. It would be great I someone could point me in the right direction. Best regards Tom #stm32f4-bootloader2013-02-11 04:13 AM
Does a read to the same location work, and is the space erased?
2013-02-11 06:04 AM
Hi,
I checked a read operation (0x11) on the same address instead of writing. It also failed. Erasing the flash, does'nt matter if complete erase or only a partial erase, is working. So there should be also no write protection on the flash. The erase command returns a final ACK. So I suppose that the flash is really erased. Best regards Tom2013-02-11 08:31 AM
Here's a STM32F4-Discovery in USART3 System Loader mode, seems to read fine
USART3 RealTerm Hex Mode
S:0x7F
R:79
S:0x00,0xFF
R:79 0B 31 00 01 02 11 21 31 44 63 73 82 92 79
S:0x01,0xFE
R:79 31 00 00 79
S:0x11,0xEE
R:79
S:0x08,0x00,0x00,0x00,0x08 ; 0x08000000, chksum 0x08
R:79
S:0xFF,0x00
R:79 28 04 00 20 9D 01 00 08 A1 02 00 08 9D 02 00 08
9F 02 00 08 F5 01 00 08 01 06 00 08 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 E5 03 00 08 F7 01 00 08 00 00 00 00 2D 03 00 08 A9 04 00 08
C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08
F9 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08
C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08
C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08
C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 45 05 00 08 C3 01 00 08
C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08
C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08
2B 03 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08
S:0x11,0xEE,0x08,0x00,0x01,0x00,0x09,0xFF,0x00 ; 0x08000100
R:79 79 79 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3
01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3
01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3
01 00 08 C3 01 00 08 29 03 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3
01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3
01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 C3 01 00 08 DF F8 0C D0 00
F0 20 F8 00 48 00 47 21 06 00 08 28 04 00 20 09 48 01 68 41 F4 70 01 01
60 08 48 80 47 08 48 00 47 00 00 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE
E7 FE E7 FE E7 FE E7 88 ED 00 E0 AD 04 00 08 89 01 00 08 06 4C 07 4D 06
E0 E0 68 40 F0 01 03 94 E8 07 00 98 47 10 34 AC 42 F6 D3 FF F7 D2 FF 60
06 00 08 80 06 00 08 FE E7 70 47 70 47 F0 B5 00 23 01 24
S:0x44,0xBB ; ERASE EXTENDED
R:79
S:0xFF,0xFF,0x00 ; MASS ERASE
R:79
2013-02-11 08:39 AM
Writing, after a restart. Might want to check if you need to flush ART cache
S:0x31,0xCE ; WRITE
R:79
S:0x08,0x00,0x00,0x00,0x08 ; 0x08000000
R:79
S:0x0F,0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xAA,0xBB,0xCC,0xDD,0xEE,0xFF,0x0F ; x10 PATTERN
R:79
S:0x11,0xEE,0x08,0x00,0x00,0x00,0x08,0x0F,0xF0 ; READ 0x08000000 x10
R:79 79 79 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF
S:0x11,0xEE,0x08,0x00,0x00,0x10,0x18,0x0F,0xF0 ; READ 0x08000010 x10
R:79 79 79 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
2013-07-02 01:35 PM
Hi, Tom. Did you solve your problem?
2013-07-02 03:07 PM
At 4-5 months out, 4 total posts, and no email alerting the odds of getting a response are pretty slim.
Please just state your problem, describe what you're doing, what you've tested so far.2013-07-03 11:02 AM
Hi, .
I've connected to the stm32f4 discovery in CAN2-Bootmode. I've successfully sent requests 0x00, 0x01, 0x But when i sent read request (0x11), controller returned 0x1F - error. I don't understand what is wrong..2013-07-03 11:30 AM
Can't say I've tried using CAN to do this.
Make sure the address you send is in big-endian format, the address range is checked for validity. Can you provide some sample packets which are being rejected? Try doing a read of 0x080000082013-07-04 01:23 PM
Thank you for responce, i try..