s32k312 ramcode application use HSE api?

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

s32k312 ramcode application use HSE api?

589 Views
victory
Contributor IV
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 Kudos
Reply
4 Replies

566 Views
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 Kudos
Reply

521 Views
victory
Contributor IV

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 Kudos
Reply

506 Views
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 Kudos
Reply

528 Views
victory
Contributor IV

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 Kudos
Reply