MC5682758 , Is there demo code about how to copy code into RAM and running in RAM?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC5682758 , Is there demo code about how to copy code into RAM and running in RAM?

1,465件の閲覧回数
terrybogard
Contributor II

Hi NXP experts,

Is there demo code about how to copy code into RAM and running in RAM?

Thanks.

0 件の賞賛
返信
1 返信

1,453件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Terry,

I think you can refer to the Flash example based on PE for MC56F8013, I attach the example here.

#pragma define_section RAW_PROG_FLASH_section ".RAW_PROG_FLASH" RX
#pragma section RAW_PROG_FLASH_section begin
static asm void Run_and_wait_in_prog_flash(IFsh1_TAddress address, word data, word command)
{
move.l A10,R2; /* Move given address to pointer register */
move.w Y0,p:(R2)+; /* Write data to the address in program memory */
move.w Y1,FMCMD_ASM;
move.w #$80,FMUSTAT_ASM;
wait:
moveu.w #$f020,R0;
adda #$3f3,R0,R0;
move.w X:(R0),A;
bftstl #$40,A1;
bcs wait;
rts;
}
#pragma section RAW_PROG_FLASH_section end

0 件の賞賛
返信