Flash read on LPC5101

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

Flash read on LPC5101

1,949 Views
cech850
Contributor I

Hi,

 

i am using LPC54101. I try to read the flash address from 0x00000000 to 0x0007FFFF. But the top 512 bytes(0x0000 - 0x01FF) of the data what i read back is wrong data, after 512 bytes (0x0200 - 0x0007FFFF) is correct data. The IAP mode has no command to  to read the flash, I read the flash by SWD. Anyone meet this problem, can you tell me how to solve?

 

 

Thanks in adavance,

Jerry

Tags (3)
0 Kudos
7 Replies

1,684 Views
cech850
Contributor I

The microcontrollers is LPC54101, I am sorry write a wrong name.

0 Kudos

1,684 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Jerry,

I haven't this chip, so could you please take screenshot to show the data you read

and the hex file you flash .

BR

Alice

0 Kudos

1,684 Views
cech850
Contributor I

QQ截图20190401180855.png

This photo is the file what I flash. All data is 0xFF.

0 Kudos

1,684 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Jerry,

I just guess maybe there is  something wrong in flashing.

I find a lpc54102 to test, it can work well.

Could you please create a bare board project, then flash it , not a file with whole 0xff.

And which IDE do you used? Or which debugger? Please share the detail steps you flashing

and the hex file. A video about the steps is best.

BR

Alice

0 Kudos

1,687 Views
cech850
Contributor I

Hi Alice

      My work is to manufacture a programmer which can flashing the file to the mcu's flash. I am not using any IDE, the debugger is what i am working for. It uses swd interface to communicate with the mcu. Don't worry about my program function and read function of my programmer. I test for them with JTAG and his program software(J-Flash), it was work.

       I just use a blank chip, I read the flash by swd interface. But the address between 0x0000 to 0x01FF of the data is still wrong data. Except for the address 0x0000-0x01FF, other data what i read back is correct.
      Only in this situation what i write the correct check-sum of vector table entries 0 through 6 which locate in 0x0000001c by the IAP command, I can read back all correct data by swd interface. So the checksum is correct or not will affect to what i read back from the flash by swd interface. If the checksum is correct, all the data what i read back from the flash is correct. If the checksum is wrong, the top of 512 bytes(the address: 0x0000-0x01FF) data is wrong, other data (the address: 0x0200-0x7FFFF) is correct.
      But the blank chip's value must be 0xFF in all flash memory, even in this address 0x001C -0x001F area(the area to store checksum), so I think it must be having some ways to disable this checksum function, if not, when the chip is blank, I can't read the all correct data forever. So how can i read all correct data in this situation? 

      About your suggest to flash a file whick is not whole 0xFF, the situation is the same as what I said above.

Thanks in adavance,

Jerry

0 Kudos

1,687 Views
cech850
Contributor I

Hi Alice

      This photo is a part of the data what i read from flash. I found the top of 512 bytes(0x0000-0x01FF) is wrong data,  other data in 0x0200-0x07FFFF address is correct data. And everytime I read the wrong data are the same. It looks like remap to another memory map.

Thanks in adavance,

Jerry

0 Kudos

1,687 Views
cech850
Contributor I

QQ截图20190401180323.png

0 Kudos