• AVR Freaks

AnsweredHot!Question about the .HEX file living update

Author
KevinHuang
Starting Member
  • Total Posts : 39
  • Reward points : 0
  • Joined: 2019/08/29 08:13:33
  • Location: 0
  • Status: offline
2020/08/08 17:57:58 (permalink)
0

Question about the .HEX file living update

Hi,
 
I'm trying to develop a code to do the flash living update. Here I found a wield thing. The device is PIC32MZ2048EFH144.
 
1, If I do not do the boot flash erasing(protected), and only erase the program flash  --- itself's .HEX file can be written down, and system can reboot normally.
 
2, If I do the boot flash erasing(unlocked), and also erase the program flash --- itself's .HEX file also can be written down, but the system can not reboot. In this case, even I reset the power, no difference.
However, I didn't find any error about the .HEX writing.
I had read the flash by ICD3 just after the chip had been programmed by the IDE v5, saved it to an new .HEX file; and compared it with the unable-reboot-flash-read-back.HEX file, they are exactly same.
I also use the IPE write the unable-reboot-flash-read-back.HEX file back to he device, the device works normally.
 
Is there any hidden operation steps need to do except the boot/program flash writing?
 
Regards,
Kevin 
post edited by KevinHuang - 2020/08/08 18:44:25
#1
NorthGuy
Super Member
  • Total Posts : 6278
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: online
Re: Question about the .HEX file living update 2020/08/08 20:20:02 (permalink) ☼ Best Answerby KevinHuang 2020/08/09 22:36:45
0
There's nothing except the contents of the program memory and boot partitions. There's also debug executive, but it only works in debug mode and has no effect on non-debug code.
 
I suspect you do not read back everything. E.g. SEQ may swap partitions and then nothing will boot.
 
Also there might be some ECC entanglements if you were using word writes.
#2
KevinHuang
Starting Member
  • Total Posts : 39
  • Reward points : 0
  • Joined: 2019/08/29 08:13:33
  • Location: 0
  • Status: offline
Re: Question about the .HEX file living update 2020/08/08 20:35:29 (permalink)
0
Then how to explain that the read-back.hex file can be uploaded by the IPE without any issue?
Thanks for the suggestions, I will try to check those registers you mentioned.
 
Thanks,
-- Kevin
#3
KevinHuang
Starting Member
  • Total Posts : 39
  • Reward points : 0
  • Joined: 2019/08/29 08:13:33
  • Location: 0
  • Status: offline
Re: Question about the .HEX file living update 2020/08/09 22:42:31 (permalink)
0
NorthGuy
There's nothing except the contents of the program memory and boot partitions. There's also debug executive, but it only works in debug mode and has no effect on non-debug code.
 
I suspect you do not read back everything. E.g. SEQ may swap partitions and then nothing will boot.
 
Also there might be some ECC entanglements if you were using word writes.


Thank you very much, NorthGuy. I removed all word writing operations, and replaced them by quota words writing, problem solved.
Don't know the difference behinds those two operations; as you mentioned, might be some ECC entanglements.
I appreciate your helps!
 
Best regards,
Kevin
 
#4
Jump to:
© 2020 APG vNext Commercial Version 4.5