HSE firmware installation

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

HSE firmware installation

12,829 Views
vikmonti7804
Contributor III

Hi,

     I want to install the HSE firmware, but i am facing one error with the package given C:\NXP\S32K3_HSE_DemoExamples_1_0_0\S32K3_HSE_DemoExamples\Device_Configuration\S32K344_HSE_FW_INSTALL.

error

make: *** [makefile:38: S32K312_HSE_FW_INSTALL.elf] Error 1

Kindly let me know the solution.

is there any firmware available for s32k312 for HSE fw installation?

0 Kudos
Reply
39 Replies

6,199 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

This is new feature and I didn't find API for that in RTD or in HSE DEMO examples. So, I used minimalist option and I simply triggered the service via MU in debugger. Here is the description of the service from API manual:

c:\NXP\HSE_FW_S32K312_0_2_40_0\docs\S32K312_HSE_Service_API_Reference_Manual.pdf

lukaszadrapa_0-1709023598929.pnglukaszadrapa_1-1709023606522.png

So, the service ID is 0x57 and no parameters are needed.

Just write 0x57 somewhere to RAM and then write address of this RAM word to Message Unit MU_0, register TR[1]. That's all. Then you will see the response in RR[1]. If the HSE FW was installed, you should get HSE_SRV_RSP_OK which is value 0x55A5AA33.

Here's how it looks in my debugger:

lukaszadrapa_2-1709023848154.png

 

0 Kudos
Reply

4,203 Views
Yetkin
Contributor I

Hi @lukaszadrapa ,

I performed HSE FW erase as you mentioned, and it worked. However, I can not install it back. How to install HSE FW again?

Best regards,

Yetkin

0 Kudos
Reply

5,836 Views
vikmonti7804
Contributor III

Hi Lucas,

         I dont have debugger PE micro. Does this trace32 power view works with PE micro?

How to trigger the service via MU in debugger with PE micro and s32DS? is there any example code?

How can i erase the controller with S32DS? Is there any example code or should i use the API FLASH_EraseBlock(dst); ?

 

 

0 Kudos
Reply

4,514 Views
vikmonti7804
Contributor III

HI Lucas,

          I tried with different board with same firmware project what you shared but the result is same as earlier. Last bit of the HSE GPR register is not getting set.

Can you please try with PE Micro debugger and try to find the root cause of the problem.

We dont have lauterbach debugger here.

i am sharing the picture of the memory with different board.

vikmonti7804_0-1709101778843.pngvikmonti7804_1-1709101788067.pngvikmonti7804_2-1709101802879.png

 

0 Kudos
Reply

3,170 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

I used another brand new board for my test and I used exactly the same project I sent you earlier. I loaded the project by S32DS via in-built Pemicro OpenSDA interface, run the project, power cycled the board 2x and then I can see that the bit in HSE GPR is set and FW is installed.

Once the HSE FW is installed, it's necessary to change the flash algorithm in Pemicro settings:

lukaszadrapa_0-1709113020433.png

That's because some parts of flash are allocated for HSE when the HSE feature flag is enabled or when AB swap FW is installed. Pemicro needs to be informed about this.

0 Kudos
Reply

3,168 Views
vikmonti7804
Contributor III

Hi Lucas,

           Thanks for your reply,

Can you please share your .elf file.

Why you power cycled the board 2 time, is it mandatory to reset is 2 time or power on 2 times?

what was the setting during flash, is it ab_sawp.arp or hse_enabled.arp in the advance setting? ?

0 Kudos
Reply

3,167 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

There's elf file in the project I already shared:
https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/S32K/32120/1/HSE_Install_FW.zip

I compared the elf with my current project which I tested today and it's identical, no changes.

I had brand new chip, so I used default hse_disabled version. If HSE feature flash is already enabled but HSE FW is not installed yet, you should use hse_enabled. And once AB swap is installed, you should use ab_swap. But I don't think this could be wrong because Pemicro should show some error if it can't erase or program the flash. Even if you use hse_disabled when HSE feature flag is programmed, it will probably still work.

To install the firmware also to passive block, two resets are needed (or two power cycles, it doesn't matter):

lukaszadrapa_0-1709119050485.png

 

0 Kudos
Reply

3,164 Views
vikmonti7804
Contributor III

Or you can create  video for the debug settings and debugging the firmware and then share with me.

0 Kudos
Reply

3,165 Views
vikmonti7804
Contributor III

Hi Lucas , i tried but its same.

Can we connect for a call hardly 10 minutes if possible? please let me know so i will share the invite.

 

0 Kudos
Reply

3,161 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

I'm running out of time today but tomorrow morning should be ok. I will let you know early in the morning when I'm available.

0 Kudos
Reply

3,145 Views
vikmonti7804
Contributor III

HI Lucas , when can we connect, please provide time and link to connect.

0 Kudos
Reply

3,301 Views
vikmonti7804
Contributor III

Dis you used the project which i shared with you?

Kindly share your main program with me.

0 Kudos
Reply

3,382 Views
vikmonti7804
Contributor III

I tried the firmware with the condition on the feature flag  but again the hse gpr resgiter is not getting updated.

vikmonti7804_0-1708676777819.png

 

0 Kudos
Reply

3,478 Views
vikmonti7804
Contributor III

Please debug it and check why hse gpr register bit is not getting set and installation is  not completing by sbaf.

0 Kudos
Reply

3,551 Views
vikmonti7804
Contributor III

Hi,

   Actually i have created a project for s32k312  but when i am running it in debug mde i see it directly jumping to default hander not going into main, can you please help with this issue, why this is happening.

i see the binary is place in flash but utest is not enabled due to not going into main.

kindly help.

0 Kudos
Reply

3,687 Views
vikmonti7804
Contributor III

Hi ,

 The HSE firmware package foe the S32K312 is only having the bin files and some interface and host files for the creation of the project. It is not the complete project like HSE demo example for s32k344.

I am also facing the issue to flash this binary of HSE firmware with the eval board debugger as well as PE micro debugger because it supports only .elf and hex file. kindly help me to flash the binary to the eval board.

 

0 Kudos
Reply

3,650 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @vikmonti7804 

The HSE FW can be found in S32K3 Standard Software package:
https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=SW32K3-STDSW-D

Open the "Automotive SW - S32K3 - HSE Firmware" and you will see all available versions including version for S32K312.

Mentioned example S32K344_HSE_FW_INSTALL shows an option how to install the firmware. I recommend to read the description:
c:\NXP\S32K3_HSE_DemoExamples_1_0_0\S32K3_HSE_DemoExamples\Device_Configuration\S32K344_HSE_FW_INSTALL\Readme.md

We also provide document AN744810 “HSE FW install for S32K3xx” which describes how to install the firmware. It can be found in Documentation in Secure Files section:
https://www.nxp.com/products/processors-and-microcontrollers/s32-automotive-platform/s32k-auto-gener...

Regards,
Lukas

0 Kudos
Reply

2,887 Views
RBSamuel
Contributor III

Hi @lukaszadrapa !

Regarding the discussion, I'm trying to swap the S32K344 board as well. I followed the following steps:
1) Download the S32K3_HSE_DemoExamples_1_0_0, went for the a/b swap, changed the linker file by adding the .pink file.

2) I compiled the project and ran it, in run time, the code keeps on the following step:

/* Wait for HSE to initialize(read status bits) after installation */
while((HSE_STATUS_INIT_OK & HSE_MU_GetHseStatus(0)) == 0)
{
gInstallHSEFwTest = FW_NOT_INSTALLED;
/* Please generate a reset to allow installation */
}

3) I tried to both push the RST button on the board and also powering it off and on again, but apparently it isn`t changing anything. 

Did I forget a step?


Thank you!

1,700 Views
sandor_b
Contributor II

Hello,

Any update here?

0 Kudos
Reply