How to set a BOOT_ID in RCHW register - MPC5643L?

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

How to set a BOOT_ID in RCHW register - MPC5643L?

1,629 Views
arthivenkatasub
Contributor III

Hi,

To boot from the application physical address, a Valid BOOT_ID is required. But, in the register it is read only. Then,how to set a boot_id ? Whether, coding should be done or it can be set? How to boot from different locations.RCHW register.PNG

Kindly, guide me how to set a BOOT_ID.

Regards,

Arthi Venkatasubramanian

Tags (2)
12 Replies

1,265 Views
weijiezhang
Contributor II

Thank you.

0 Kudos

1,265 Views
weijiezhang
Contributor II

Hi, 

Happy to hear that, and can you tell me what you did in detail? I also want to konw .

whis your reply.

0 Kudos

1,265 Views
arthivenkatasub
Contributor III

Hi Sir,

I just did what yo suggested. Actually I changed the reset vector original address from 0x00000000 to 0x00004000 and init original address from 0x00000010 to 0x000004010 in the memory.

pastedImage_1.png

And then  i was able to get the value loaded in the desired location.

Now I am trying to do  flash two different application having different address into the target.

I am looking for how to approach this.

Thanks,

Arthi Venkatasubramanian

1,265 Views
weijiezhang
Contributor II

Firstly, you can see the figure below which is captured from the link script file. Gennerally, we set the RCHW in the startup file  but the address is declared in the ld file ,  look the content which I mark with red pen, I set the 0x01040000 as the reset address, So our code will be programmed from 0x01040000, and execute from this address. if you want to set the 3rd location as the start address. you can try this method. Wish this help you. And please tell me the result.capture.JPG

0 Kudos

1,265 Views
arthivenkatasub
Contributor III

Hi Sir,

Thanks for your reply. Sorry for the delay. It is working correctly. 

Regards,

Arthi Venkatasubramanian

0 Kudos

1,265 Views
weijiezhang
Contributor II

Hi,

I have no experience about that except bootloader application.

But our bootloader project and the application project have their owen startup file and ld file.

So the RCHW can be cofigured individually.

1,265 Views
weijiezhang
Contributor II

Hi,

Generally, The RCHW should be set in the startup file. if you don't set it , your project can't be loaded correctly.

Wish this can hlep you.

0 Kudos

1,265 Views
arthivenkatasub
Contributor III

Hi,

Thanks for your reply. 

If I need to boot from 2 different application physical addresses, how to set the RCHW in startup file?

Can you provide me an example?

Regards,

Arthi Venkatasubramanian

0 Kudos

1,265 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

You will have 2 RCHWs in 2 bootable flash locations.

1. is where your application always starts - here you will determine if second application will be started.

If YES you will jump directly to second application.

If NO you will stay in current application.

Peter

1,265 Views
arthivenkatasub
Contributor III

Hi,

I understood RCHW needs to be configured. By default, the RCHW of  1st location will be valid and then it checks for a valid RCHW in a sequence manner. Instead of default location, if I need to boot from other location (say 3rd location), how to configure RCHW such that it is valid and also how to make the default one as invalid? 

pastedImage_1.png

Kindly reply to my question.

Regards,

Arthi Venkatasubramanian

0 Kudos

1,265 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

RCHW is no register. It is  Reset Configuration Half-Word which is part of flash non volatile memory.

You have to use valid flash writing algorithm to be able write to flash the RCHW.

Peter

0 Kudos

1,265 Views
arthivenkatasub
Contributor III

Hi,

I would like to know RCHW is set in start up file.

Regards,

Arthi Venkatasubramanian

0 Kudos