lpcware

ISP: Fail to copy to the first 512 bytes of sector 0 of FLASH

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by andrenvq on Sun Mar 06 23:50:33 MST 2016
So I tried to flash LPC1768 through ISP starting at FLASH address 0x00. I am flashing 256 bytes at once. The first two runs that flashes at FLASH address 0x00 and 256 fails as can be seen below, then the third run and so on run just fine; however, the code runs fine on LPC1768. I commanded the ISP bootloader to read FLASH and RAM content to check validity.

What I checked:
1. Correct checksum at 0x1C
2. Return code from all commands are 0
3. Contents in RAM are correct, checked with online UU-encoder
4. I did call unlock 231300
5. I did call prepare command for sector 0 as in "P 0 0"



Synchronized
SynchronizedOK
12000OK
U 231300

P 0 290
E 0 290
A 0
0
0
0 <-- "W 268435968 256"
OK <- checksum
0 <- P 0 0
0 <- C 0 268435968 256
0 <- R 268435968 256
M`(``$`T"```5`@``%P(``!D"```;`@``'0(``'9S_^\````````````````?
M`@``(0(````````C`@``)0(``"<"```G`@``)P(``"<"```G`@``)P(``"<"
M```G`@``)P(``"<"```G`@``)P(``"<"```G`@``)P(``"<"```G`@``)P(`
M`"<"```G`@``)P(``"<"```G`@``)P(``"<"```G`@``)P(``"<"```G`@``
M)P(``"<"```G`@``)P(```#P`O@`\);X"J"0Z``,@D2#1*KQ`0?:10'1`/"+
?^*_R"0ZZZ`\`$_`!#QB_^QI#\`$#&$D0P``1$,`````
8428
0 <- R 0 256
M_!\`$($`_Q\`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````#?^!A`W_@0
M4"9H!>H&!B9@W_@`\`$"_Q__O___P,,/0```````````````````````````
M````````````````````````````````````````````````````````````
?````````````````````````````````````````````
4789
0
OK
0
0
0
M$#HDOWC(>,'ZV%(')+\PR##!1+\$:`Q@<$<````C`"0`)0`F$#HHOWC!^]A2
M!RB_,,%(OPM@<$=N*0#PD8-P*0#PQX1F*0/P18=E*0/P0H=G*0/P/X=A*0/P
M/H<#:!L**+]!\(`!:2D`\#Z#9"D`\#N#=2D`\#B#;RD`\%6$>"D`\).$Z2D`
M\.^#Y"D`\.R#]2D`\.F#[RD`\%*$^"D`\)*$`VC;"2B_0?"``6,I`?#Q@W,I
M`?#V@^,I`?`!A/,I`?`&A``@<$<?M9WH`P``\%?_`?"S_@0``"``(0/P_/U`
?'&!@`"``(0/PX/W@8`#PD?X`\"_Z'[T"\-C]$4;_]_?W
27771
0
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
?````````````````````````````````````````````
0
0
OK
0
0
0
MX_\"\*3\`O`7_P``!DB`1P9(`$?^Y_[G_N?^Y_[G_N?^Y_[G_N?^YY4K``#%
M````"T8!1AA&`/`GNP``#[0`M8VP$*D)D`"1"Y!/\/\P"I``(`R0!DAX1`:0
M!DAX1&I&!Y`/F0FH`/`)_0VP7?@4^T,*``!;"@``<+4$1L!H@0<3T(`&`=6E
M:@3@H6E@:`A$(6E%&B!&`/#Y_0`B!D8I1B!&`/`?_3!&<+T`('"]<+40L;WH
M<$#?YP`E!TQN'@?@($;_]]G_`+$U1B!M(/`!!``L]=$H1G"]?`(`$#HH`-(P
?."#P(`)!*@'3HO$W`(A"`=-/\/\P<$=P1W!'________
27231
0
MX_\"\*3\`O`7_P``!DB`1P9(`$?^Y_[G_N?^Y_[G_N?^Y_[G_N?^YY4K``#%
M````"T8!1AA&`/`GNP``#[0`M8VP$*D)D`"1"Y!/\/\P"I``(`R0!DAX1`:0
M!DAX1&I&!Y`/F0FH`/`)_0VP7?@4^T,*``!;"@``<+4$1L!H@0<3T(`&`=6E
M:@3@H6E@:`A$(6E%&B!&`/#Y_0`B!D8I1B!&`/`?_3!&<+T`('"]<+40L;WH
M<$#?YP`E!TQN'@?@($;_]]G_`+$U1B!M(/`!!``L]=$H1G"]?`(`$#HH`-(P
?."#P(`)!*@'3HO$W`(A"`=-/\/\P<$=P1W!'________
27231
0



Why is this happening? Is it normal?

Outcomes