s32k312 ramcode application use HSE api?

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

s32k312 ramcode application use HSE api?

1,409 次查看
victory
Contributor V
Hi NXP,
 
    i want use ramcode binary (which all code are in SRAM region) in a factory program application. use jlink to set PC to run, it works fine.
 
    but when it call HSE api, eg read hse version, get_attr ... etc, it fails. debug located that it fails to get hse channel and not to call HSE_Send().
is it possible to call hse function in ramcode? 
0 项奖励
回复
4 回复数

1,386 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @victory 

It doesn't matter where the code is running from. I'm not sure what's going on, it would be necessary to debug the "get hse channel" more.

Regards,

Lukas

0 项奖励
回复

1,341 次查看
victory
Contributor V

update 2:

   currently, i can load ramcode to mcu and set PC to run,   or use ozone to load ramcode elf to mcu and run, both are ok.(uart can print, interrupt can trigger)

   but in either case, hse can't work.  i guess that in ramcode mode, the IVT header (0xA5 ) or app header(0xd5) are not checked,  it started run from reset handler by user setting PC, is it a problem that SAF /HSE not run?

0 项奖励
回复

1,326 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

I can't see problem here. Could you please check content of HSE GPR register at 0x4039_C028 and then content of GSR and FSR registers in MU_0 after execution of HSE_Send()?

0 项奖励
回复

1,348 次查看
victory
Contributor V

problem update 1:

    1. ide can't load ramcode after chip power on.  ide or other tool need init ecc sram first , then ramcode can write. i am fixed this issue.

 current problem is :

1.  after chip power on and jlink initialized sram, ide/ozone can run the code(hse still not working). but use jlink to write the ramcode and set reg15(PC) not working.  it goes hardfault in startup_cm7.s somewhere,  is there any precondition need to do ? thanks.

0 项奖励
回复