Hi,
Please check the chapter 38 of RM.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Just for reference, I picked up the simpler commands sequence to write data onto FLASH of JN518X.
//Seigo
Command Bytes Sequence:
0000094E00A709AE19
^1^^^2^3^4^^^^^^^5
1: always zero
2: size of the sequence (including all bytes, bigendian)
3: command id (0x4E=Open ISP)
or response id
4: command parameters (depending on commands)
or response parameters (the first byte always its command status, success or error code)
5: CRC32 (from 1: to 4:)
===
Firstly set ISP pin as LO and RESET module,
The connect UART port as 115200bps 8N1.
>0000094E00A709AE19
Command ID=4E(PARAMETERS:00): Unlock ISP
<0000094F00BE129F58
Command RESPONSE=4F(PARAMETERS:00): Unlock ISP(00:Success)
>00000832214A0494
32(): Get Device Info
<000011330088888888CC0000148DDBB66D
33(0088888888CC000014): Get Device Info(00:success, 88888888:chip id, cc000014:version)
>0000194E01112233445566778811223344556677884B1703XX
4E(0111223344556677881122334455667788): Unlock ISP(01: Start ISP, 1122...88:Key)
<0000094F00BE129F58
4F(00): Unlock ISP(00:Success)
--- If you try to change baud, you can call the command of Set Baud Rate here (0x27,0x28 command).
>00000A40000F3E5AD196
40(000F): Open Memory for Access(00:FLASH, 0F:Mode=RdWrErEa)
<00000A410000AF27A630
41(0000): Open Memory for Access(00:Success, 00:Handle=0)
>0000124200000000000000420000CCA2F324
42(00/00/00000000/00420000): Erase Memory(00:Handle, 00:Mode(always 0), 00000000:Address=0x0, 00420000:Size=0x2400=97KB)
<000009430012A7D054
43(00): Erase Memory(00:Success)
>000012440000000000000042000024173967
44(00/00/00000000/00420000): Blank Check Memory(00:Handle, 00:Mode(always 0), 00000000:Address=0x0, 00420000:Size=0x2400=97KB)
<000009450044FD77D2
45(00): Blank Check Memory(00:Success)
--- here, transmit firmware binary file (.bin) from the top without skipping any bytes.
--- note: the transmit chunk must be 512bytes (= FLASE sector size).
>0002124800000000000000020000...
48(00/00/00000000/00020000/...data...):
Write memory(00:Handle, 00:Mode(always 0), 00000000:addr=0x0, 00020000:length=0x200=512B, ...)
<0000094900E84838DE
49(00): Write memory(00:Success)
>0002124800000002000000020000...
48(00/00/00020000/00020000/...data...):
Write memory(00:Handle, 00:Mode(always 0), 00020000:addr=0x200, 00020000:length=0x200=512B, ...)
<0000094900E84838DE
49(00): Write memory(00:Success)
>0000094A00C3656B1D
4A(00): Close Memory(00:Handle)
<0000094B00DA7E5A5C
4B(00): Close Memory(00:Success)
>00000814F3478169
14(): Reset
<0000091500FE462A86
15(00): Reset(00:Success)
Hi,
Please check the chapter 38 of RM.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------