Kinetis ROM Bootloader - on mkl17z32vlh4 - wrong response on eraseAll command

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kinetis ROM Bootloader - on mkl17z32vlh4 - wrong response on eraseAll command

2,290 Views
marianoT
Contributor III

hi, i´m tring to update flash using ROM bootloader (host is other uC with the protocol implemented), i succesfully sync baudrate with ping command, but when the eraseAll command is sent, the response is Ping Response Packet NOT ACK + Generic Response as data sheet diagram said. The command execute succesfully, memory is erased

this is the senquence (crc intentionally avoided):

Send: 0x5a 0xa6 (Ping)

Response: 0x5a 0xa7 0x0 0x1 0x1 0x50 0x0 0x0 (Ping Response)

Send: 5a a4 4 0 c4 2e 1 0 0 0 (EraseAll)

Response: 0x5a 0xa7 0x0 0x1 0x1 0x50 0x0 0x0 (Ping Response)

thanks

0 Kudos
5 Replies

2,254 Views
marianoT
Contributor III

workaround for read memory cmd:

Send Read Memory  (Cmd 0x03 - size 32 bytes)

Response : 5a a7 0 1 1 50 0 0 (Ping Response)

Send ACK (0xA1)

Response ACK (0xA1)

Send ACK (0xA1)

Response Data packet (0xA5) - But only 12 bytes are receive.

Any ideas?

thanks

0 Kudos

2,277 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Mariano,

Which host program do you use, blhost or your own program?

Please refer to the Table 13-2 in reference manual. FlashEraseAllUnsecure is supported at all time. FlashEraseAll command is not supported when secured.

 

Regards,

Jing

0 Kudos

2,270 Views
marianoT
Contributor III

hi Jing, the device isn´t secured, the command succesfully erase the memory but the response is incorrect. Also with command Get Property, or Read Cmd the response is incorrect, always Ping Response. We are developing a custom host for the bootloader.

 

Send: 5a a4 8 0 73 d4 7 0 0 1 1 0 0 0 Get Property

REsponse : 5a a7 0 1 1 50 0 0 (Ping Response)

 

thanks

0 Kudos

2,235 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

You can download a NXP_KINETIS_Bootloader_2.0.0 package from here.

https://www.nxp.com/webapp/sps/download/license.jsp?colCode=NXP_KINETIS_BOOTLOADER_2_0_0&appType=fil...

 

In this package there are two sample project may useful to you. One is in \validation\embedded_host. It runs on K65 and can download code to target by UART automatically. The other is in \apps\bus_pal. It can translate UART command to I2C/SPI command to interface with target bootloader.

There are many useful documents in this package.

As to the problem, you can use blhost to send command to KL17, use oscilloscope or logic analyzer to catch the wave and then compare with your wave.

 

Regards,

Jing

0 Kudos

2,231 Views
marianoT
Contributor III

Hi Jing, 

Using KinetisFlashTool can´t connect with mkl17z32vlh4 ROM boot, using UART. I get the same behaviour with a custom host.

this is the log of KinetisFlashTool:

[5a a6]
<5a>
Ping responded in 1 attempt(s)
<a7>
<00 01 01 50 00 00 78 04>
Framing protocol version = 0x50010100, options = 0x0
inject command 'get-property'
[5a a4 0c 00 6c 3c 07 00 00 02 05 00 00 00 ee cc a2 77]
<>
<>
<>
<>
<>
Error: read_start_byte() timeout after 5.107 seconds
sendCommandGetResponse.writePacket error 5.
processResponse: null packet
- took 5.109 seconds

0 Kudos