-1

I am using LPC54606J512BD100 and facing issue that after uploading the flash from the hex generated by command using keil IDE the flash data microcontroller has is changed. Using LPC-Link 2 Rev B and Ulink2 as debugger.

I am using the following command

.\bin\srec_cat .\Objects\project.hex -Intel -fill 0x00 0x00 0x7FFFE -crop 0x00 0x7FFFE -CRC16_b_e 0x7FFFE -O .\Objects\project.hex -Intel -line-length=44

This is the part of hex generated by keil

:020000040000FA
:1000000000800220A1040000C1040000C50400001B
:10001000C9040000CD040000D1040000000000006D
:10002000FFFFFFFF0000000000000000D5040000FB

Flash data downloaded from microcontroller

Command used in KEIL IDE

SAVE memoutput.hex 0x00,0x7FFF

Portion of hex where the change is

:020000040000FA
:1000000000800220A1040000C1040000C50400001B
:10001000C9040000CD040000D10400007263FDDFBC
:10002000FFFFFFFF0000000000000000D5040000FB

So, the second line last 4 bytes are changing unable to know why?

Original:        10001000C9040000CD040000D1040000000000006D
From Controller: 10001000C9040000CD040000D10400007263FDDFBC
rock123A
  • 82
  • 2
  • 11
  • 1
    This memory region is part of the vector table. Did you consider that it might be relocated and you read another memory? Unfortunately I did not find a reference manual in short time. – the busybee Aug 04 '23 at 12:30
  • or it didnt actually write the flash and you are seeing stale data. or you have multiple banks and you have a different bank selected, etc. seems like there is not enough info here to answer the question. – old_timer Aug 04 '23 at 14:02
  • is nxp still doing that checksum the vector table thing they used to do in the old days? that could be what is going on here. did you read the datasheet/reference manual? – old_timer Aug 04 '23 at 14:08
  • using .\bin\srec_cat command for generating the hex file with complete flash memory of 512KB (0x00 to 0x7FFFE) so no memory region is kept unprogrammed. But as you can see that the memory from 0x00100C to 0x0010FF – rock123A Aug 05 '23 at 11:23

0 Answers0