Crypto_SymmetricPrimitives_S32K312 example

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

Crypto_SymmetricPrimitives_S32K312 example

2,167 Views
Cppppy
Contributor II

Hello, NXP
I recently tried to use the Crypto driver for the S32K312.


I successfully generated the elf file of Crypto_SymmetricPrimitives_S32K312 example provided by NXP and downloaded the elf file into the S32K312 project board I am currently using, but it does not perform the Crypto module functions properly.


The problem should be in the while loop of Wait for the HSE response in the Hse_Ip_ServiceRequest function, how should I solve this problem?

Cppppy_0-1679367762839.png

The following is the MCAL version I am using and the specific example path.
(C:\NXP\SW32K3_RTD_4.4_2.0.2\eclipse\plugins\Crypto_TS_T40D34M20I2R0\examples\EBT\Crypto_SymmetricPrimitives_S32K312)

Attached is the elf file I generated for Crypto_SymmetricPrimitives_S32K312.

Looking forward to your reply, thanks!

 

0 Kudos
16 Replies

2,148 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Cppppy 

Just to confirm, did you install the HSE FW before running the example code?

 

B.R.

VaneB

0 Kudos

2,144 Views
Cppppy
Contributor II

Hi @VaneB 

Before running example, I have installed HSE FW.
Because if HSE FW is not installed, the elf file cannot be generated. But I found that the installation path of HSE FW and the HSE FW extraction path in project_parameters.mk are not consistent, the direction of the slash is reversed, will this have any effect?

Cppppy_0-1679450277647.png

Cppppy_1-1679450284941.png

 

 

0 Kudos

2,135 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Cppppy 

Could you elaborate on the "extraction path in project_parameters.mk are not consistent"?

Could you also tell me how you installed the HSE FW?

0 Kudos

2,126 Views
Cppppy
Contributor II

Hi @VaneB 

The installation path should be OK, the elf file has been generated and can be downloaded into the S32K12 project board.
I downloaded the HSE FW from the NXP website, the exact address is shown in the picture.

 

nxp-2.png

nxp-1.png

0 Kudos

2,100 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Cppppy 

According to your first image posted, the code awaits the HSE's response. So it may not have been installed correctly.

Additionally, did you perform the following step when debugging?

"If the debug configuration is set to Debug_FLASH, go to the PEmicro Debugger Tab => click Advanced Options button => at the Flash Algorithm Selection => select nxp_s32k344_1x32x980k_hse_enabled => click OK button to close Advanced Options dialog."

0 Kudos

1,941 Views
Cppppy
Contributor II

Hi @VaneB 

I reinstalled HSE and did what you suggested during DEBUG, but now the problem persists. Is there any other solution please?

Cppppy_0-1680491302482.png

 

0 Kudos

1,921 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Cppppy 

Could you help me with one last check regarding the HSE FW installation?

The HSE Demo App has functions that verify if the HSE was correctly installed. See the below image:

VaneB_0-1680562413630.png

Please help me with the result of this test.

 

0 Kudos

1,916 Views
Cppppy
Contributor II

Hi @VaneB 


Which installation path can I find the code in this picture? I didn't find this code in C:\NXP\SW32K3_RTD_4.4_2.0.2\eclipse\plugins\Crypto_TS_T40D34M20I2R0\examples and C:\NXP\HSE_FW_S32K3XX_0_2_6_0 path.

0 Kudos

1,904 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Cppppy 

These functions are in the HSE Demo App, which you will find where you downloaded the HSE FW.

0 Kudos

1,856 Views
Cppppy
Contributor II

Hi @VaneB 

I downloaded the HSE Demo App from the NXP website and tried to open it in S32DS 3.4, but S32DS does not recognize the project. Do I need to do other operations to import the project into S32DS and generate the elf file?

Attached is the HSE Demo App I downloaded, and it doesn't match the code in your picture.

Cppppy_0-1681096021634.png

Cppppy_1-1681096080762.png

 

 

0 Kudos

1,848 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Cppppy 

The code I share is another version, but the functionality is almost the same.

At the HSE_DEMOAPP_S32K3XX_0_2_6_0_ReadMe.pdf comes the guide on how to Import and Build the project using S32 Design Studio.

0 Kudos

1,836 Views
Cppppy
Contributor II

@VaneB 

I ran S32KXX_demo_app in HSE_DEMOAPP_S32K3XX_0_2_6_0, but the program went into a loop in the WaitandSetFWEnablefeatureflag function, which seems to indicate that my S32K312 chip HSE FW usage flag is not already enabled.


Is this a hardware problem or is there something wrong with the program's runtime environment?


Another problem is that the HSE_DEMOAPP_S32K3XX_0_2_6_0y I downloaded should correspond to the S32K312, but the DEBUG configuration and program identification in S32DS identifies this program as S32K3X4, so I wonder if this will have any effect on the running of the program?

Cppppy_1-1681194378579.png

Cppppy_2-1681194535373.png

 

 

0 Kudos

1,828 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Cppppy 

To change the debug configurations to the S32K3x2, right-click on the project and then select at Build Configurations -> Set Active -> 2 S32K3x2. Please refer below image.

VaneB_0-1681235435679.png

 

0 Kudos

1,812 Views
Cppppy
Contributor II

Hi @VaneB 

After I changed the DEBUG configuration to S32K3X2, the result of the program running did not change, still in WaitandSetFWEnablefeatureflag () into the while loop can not be broken out.

Do I need to enable HSE manually or does this mean that there is a problem with my hardware or software environment?

Cppppy_0-1681263906013.png

Cppppy_1-1681264013293.png

 

 

0 Kudos

1,801 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Cppppy 

You still have no response from the HSE, so it remains in that loop.

From the image that you shared, I could see that the project was imported incorrectly since if you look at the following image, you can see that you must have the demo app and SecureBootApp.

VaneB_0-1681321728812.png

Please review the steps listed in the HSE_DEMOAPP_S32K3XX_0_2_6_0_ReadMe file that you find in the following path:
C:\nxp\HSE_DEMOAPP_S32K3XX_0_2_6_0\HSE_DEMOAPP_S32K3XX_0_2_6_0_ReadMe.pdf

0 Kudos

1,762 Views
Cppppy
Contributor II

Hi @VaneB 

The problem has been solved and the HSE Demo is now working properly. The reason for the problem is because the S32K312 chip I am using has not been installed with HSE.


Thank you very much for being very patient in answering my questions for so long!

0 Kudos