BAF configuration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,937件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
1 解決策
3,602件の閲覧回数
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

元の投稿で解決策を見る

2 返答(返信)
3,603件の閲覧回数
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,602件の閲覧回数
vladstoica
Contributor III

Thank you very much!

0 件の賞賛
返信