S32k3 HSE firmware memory verification time

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

S32k3 HSE firmware memory verification time

Jump to solution
873 Views
luhaiou
Contributor II

1.My understanding of HSE is that HSE is a system with its own kernel(CM0+) and peripherals(RAM,ROM,crypto....),

So which module in the HSE subsystem use  the HSE_CLK?

luhaiou_0-1711458167783.png

2.HSE subsystem run before app kernal,

  The app clock configuration code hasn't run yet, when HSE subsystem is running,

The secure boot run in HSE subsystem, so what is the running clock of the HSE at this time?

As shown in the figure below

CORE_CLOCK  is the  CM0+ in HSE subsystem   or   application core (CM7)  ?

if HSE_CLK is configuration in APP code, then it is not useful in secure boot ,so I can not understand this

luhaiou_2-1711458772915.png

 

 

0 Kudos
1 Solution
682 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

As you mentioned, DCMROF21 is read only, so you can't write it directly. You can program corresponding DCF record and this record is then loaded to DCMROF21 during reset:

lukaszadrapa_0-1712555050715.png

 

View solution in original post

0 Kudos
10 Replies
748 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @luhaiou 

default source of clock is FIRC_CLK. The same clock is used for HSE. This is valid until you reconfigure the clocks by your application.

If you want to speed the secure boot up, there's an option to configure clock and PLL before the secure boot. It's necessary to set PLL_ENABLE in Boot Configuration Word, then it's necessary to program FXOSC configuration to UTEST. This configuration is then used only when secure boot is enabled. See please HSE-B Firmware reference manual and S32K3 reference manual for details.

Regards,

Lukas

0 Kudos
709 Views
luhaiou
Contributor II

Hi Lukas,

Thanks for your reply,

There is one more question I would like to ask,

luhaiou_0-1712495142663.png

1. An individual DCF record can config HSE_CLK_MODE,

the HSE_CLK_MODE_OPTION field in the DCMROF21 register in DCM  can also config HSE_CLK_MODE, then which of the two ways has a higher priority

2.DCMROF21 is Read-Only register ,

Read-Only GPR On Functional Reset 21 (DCMROF21)

So when is the value in the register set?

0 Kudos
683 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

As you mentioned, DCMROF21 is read only, so you can't write it directly. You can program corresponding DCF record and this record is then loaded to DCMROF21 during reset:

lukaszadrapa_0-1712555050715.png

 

0 Kudos
617 Views
luhaiou
Contributor II

Hi Lukas,

I have some doubts about the start-flow of the s32k3, and I hope to get your solution to it.

There is a machine that uses s32k314, HSE Firmware Usage feature flag(0x1B00,0000) is not program, HSE_FW is not installed.And the bit  IVT_AUTH is set 0, BOOT_SEQ is set 1, IVT.pHSE is set 0.The machine is able to start normally.

I have some doubts about the Start-up flow on the manual of RM758222-HSE-B Firmware Reference Manual - V2.2(2.2).pdf.

luhaiou_0-1712921106819.png

luhaiou_1-1712921666972.png

 

luhaiou_3-1712921900128.png

1. Looking at the flowchart, the device should go into recovery mode, but my machine boots normally, why is this happening?

2.There is no mention of the judgment of HSE Firmware Usage feature flag (0x1B00,0000) in the flowchart, I think this is a very important parameter, please help sort out its judgment logic

We look forward to hearing from you, thank you very much.

0 Kudos
574 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

If HSE FW is not installed (HSE feature flag not set, HSE FW not installed etc.), the device won't enter recovery mode. That's possible only if HSE FW is installed.
I saw there are some internal documentation tickets related to these flowcharts, so it will be updated in the future.
Regards,
Lukas

0 Kudos
560 Views
luhaiou
Contributor II

Hi,Lukas

Thanks for your reply,

For me, the startup flow is more complex and can involve a lot of logical judgment.

Can I understand this way, if HSE FW is not installed (HSE feature flag not set, HSE FW not installed etc.), I don't need to care if the BOOT_SEQ bit is 0 or 1, the app core will start normally.

I ask this question because there are some machines that we provide to our customers that have no HSE FW installed,

and in order to avoid multiple software versions, we only provide one software version, which is signed and BOOT_SEQ bit is set 1.

I would like to confirm if there are any limitations in the startup flow for this version of the software on machines that HSE_FW are not installed.

Regards,

Luhaiou

0 Kudos
521 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

I can't see problem here, the BOOT_SEQ will be ignored in this case.

Regards,

Lukas

0 Kudos
473 Views
luhaiou
Contributor II

Hi,Lukas

Thanks for your reply,

I would like to ask how long it takes to install HSE_FW.

According to my understanding,

when the HSE Firmware Usage feature flag (0x1B00,0000) and LOAD_ADDR are configured, reset the MCU, install the HSE_FW, and jump to APP core after the installation is complete.

1. My actual test installation time is 1s, is this time correct

luhaiou_0-1713321373556.png

2.jump to APP core after the installation is complete,In this case, the value of FSR is 0, that is

luhaiou_2-1713323164387.png

luhaiou_1-1713321947268.png

after first reset HSE_STATUS_INIT_OK is 0, after second reset ,HSE_STATUS_INIT_OK is 1,Is this a normal phenomenon?Is this the internal logic of HSE_FW?

3.After the first reset, after jumping to APP core, whether the installation HSE_FW process has ended,

and Whether there is a need to wait for a certain amount of time before the second reset

Regards,

Luhaiou

0 Kudos
394 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

1. Yes, the installation should take about 0.8s - 1s, so it's expected value.
2. The HSE FW is installed after first reset. To make it running, another reset is needed. And if you use AB SWAP version, one more reset is needed beucase HSE FW needs to be programmed also to passive block.
3. Once the HSE FW is installed, you need to always wait after reset till HSE_STATUS_INIT_OK bit is set before triggering a service request to HSE.

0 Kudos
391 Views
luhaiou
Contributor II

Thank you very much for your reply, your reply has helped me a lot

0 Kudos