BAF configuration

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

BAF configuration

Jump to solution
3,956 Views
vladstoica
Contributor III

Hello,

 

I am making a firmware update in flash memory of MPC5748G, and I am writing in a different sector a new startup code, text code, etc. I want to modify the BAF configuration so after a reset it will start from the new sector and not from the old one. What registers should I modify for that?

 

Thanks,

 

Vlad

Labels (1)
0 Kudos
Reply
1 Solution
3,621 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

this is copied from reference manual:

pastedImage_0.png

pastedImage_1.png

So, it is necessary to place a constant to one of addresses shown above. Something like this:

#pragma ghs section rodata=".boot_header"

const uint32_t bootheader = 0x005A0002; // e200z4a will start execution

const uint32_t z2_reset_vector = 0;

const uint32_t cnfg1_bits = 0;

const uint32_t cnfg2_bits = 0;

const uint32_t startAddress = (uint32_t) _start; //start address of e200z4a

const uint32_t z4b_reset_vector = 0;

const uint32_t reserved_for_future_use = 0;

#pragma ghs section rodata=default

If there are more valid boot headers, the first one is used. If you want to make other boot header active, it is necessary either erase the previous one or jump to specified start address of second application by your software.

Regards,

Lukas

View solution in original post

2 Replies
3,622 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

this is copied from reference manual:

pastedImage_0.png

pastedImage_1.png

So, it is necessary to place a constant to one of addresses shown above. Something like this:

#pragma ghs section rodata=".boot_header"

const uint32_t bootheader = 0x005A0002; // e200z4a will start execution

const uint32_t z2_reset_vector = 0;

const uint32_t cnfg1_bits = 0;

const uint32_t cnfg2_bits = 0;

const uint32_t startAddress = (uint32_t) _start; //start address of e200z4a

const uint32_t z4b_reset_vector = 0;

const uint32_t reserved_for_future_use = 0;

#pragma ghs section rodata=default

If there are more valid boot headers, the first one is used. If you want to make other boot header active, it is necessary either erase the previous one or jump to specified start address of second application by your software.

Regards,

Lukas

3,621 Views
vladstoica
Contributor III

Thank you very much!

0 Kudos
Reply