BAF configuration

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

BAF configuration

跳至解决方案
3,835 次查看
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,500 次查看
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,501 次查看
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,500 次查看
vladstoica
Contributor III

Thank you very much!

0 项奖励
回复