LPC54606J512BD100 vs LPC54606J256BD100 program execution

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

LPC54606J512BD100 vs LPC54606J256BD100 program execution

Jump to solution
1,605 Views
vijo
Contributor III

hi,

my 75k program build for the LPC54606J512BD100 internal flash runs ok, but for some reason the same program loaded in a LPC54606J256BD100 CPU does not run.

Any good ideas of what to check ?

Best regards

Viggo

 

Labels (2)
0 Kudos
1 Solution
1,506 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello vijo,

Yes, there isn't mentioned in UM and DS, I will submit a ticket to document team.

Thanks for your sharing.

 

BR

Alice

View solution in original post

0 Kudos
12 Replies
1,562 Views
abnxpweb
Contributor III

IIRC, the LPC546xx 256KB flash devices have less RAM on board than the 512KB flash devices.

I would suspect that your 512KB device targeted project is placing the stack pointer at a RAM location that doesn't exist on the 256KB device. Which will cause a hard fault or similar as your application starts executing.

If this is the case, then the solution would probably be to change the location that the stack pointer in being placed at. If using MCUXpresso IDE, you could probably do this by just using the memory configuration editor to reduce the size of the first RAM bank (more info in the IDE User Guide).

Hope this helps!

0 Kudos
1,549 Views
converse
Senior Contributor V

A simple look at the data sheet shows that the 256 variant has less RAM than the 512 variant, so I suggest you review the placement of the stack and heap as they are likely to have been placed into locations that do not exist, thus causing a hard fault.

if you want a single binary that runs on both variants, build it for the smaller one - never for the larger one.

0 Kudos
1,544 Views
frank_m
Senior Contributor III

> ...so I suggest you review the placement of the stack and heap as they are likely to have been placed into locations that do not exist, thus causing a hard fault.

Definitely, since most linkers put the stack at the very and of the RAM. A rebuild with the proper linker script (i.e. MCU variant) should suffice.

Yes, reading the fine print ... not that I never neglected it

0 Kudos
1,532 Views
vijo
Contributor III

tank you for the input.

From the ordering options 256K flash type is only with 136K RAM, not 200K.

Neither datasheet nor manual states which areas are left out, but it must be the SRAM2 and SRAM3 32K areas.

BR

Viggo

 

0 Kudos
1,520 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello vijo,

Yes, you are right, the 256K chip LPC54606j256 doesn't includes SRAM2 and SRAM3.

The memory detail should like below:

Alice_Yang_0-1616659053434.png

 

 

BR

Alice

0 Kudos
1,517 Views
vijo
Contributor III

hello Alice,

great, thank you for the info.

Could this be expressed a bit more visible please in the data sheet or the manual. You screen dump is from the MCUXpresso.

BR

Viggo

0 Kudos
1,507 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello vijo,

Yes, there isn't mentioned in UM and DS, I will submit a ticket to document team.

Thanks for your sharing.

 

BR

Alice

0 Kudos
1,573 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Vijo,

Could you please describe more detail about "CPU dose not run" ?

How about debug it? Does it stop at one step or can't run up ? Or something others?

What about your project ? How change to other project? 

 

BR

Alice

0 Kudos
1,568 Views
vijo
Contributor III

hello Alice,

well I can se that my application is not behaving correctly in the 256K CPU. Exactely the same application is running fine in the 512K CPU.

I'm loading the application as a bin file via the USB port in mass storage mode in both CPUs.

I have not done further debugging of the problem as we only have 3 pcs of the 256K CPU(due to the market situation), and we are switching to the flashless LPC54016 in stead of, and concentrtate on that.

I write this support ticket to see if others have had the same problem - and maybe a solution.

By studying the data sheet, the memory map is exactely the same for the 256K and the 512K variants and I was naive enough just to try it - and now my curiosity is waked up;-)

BR

Viggo

0 Kudos
1,591 Views
vijo
Contributor III

hi frank

yes I'm avare of the 256K flash size(address from 0 to 0x4 0000) but my programs last/max load address is 0x1 7e90 according to the map file.

The memory mapadresses  is the same for the 2 CPUs according to the datasheet.

No haven't debugged yet. I was just assuming that the program would load and run directly.

0 Kudos
1,586 Views
frank_m
Senior Contributor III

That assumption is not unjustified - from a superficial comparison, I can't see any other difference between both types.

There might be other reasons, but that involves assumptions about your application, i.e. the code.

0 Kudos
1,600 Views
frank_m
Senior Contributor III

The LPC54606J256BD100 has only half the Flash size.

Did you check the map file, if the code layout is compatible with both types, i.e. the associated address ranges ?

Tried to debug ?

0 Kudos