Hello
My current project requires the use of the Crypto driver for the S32K312. The problem I am currently encountering is that the CMAC_Generate and CMAC_Verify functions work fine with the Crypto Demo provided by NXP in the same MCAL configuration.
But when I call these two functions with my own program, the Crypto_Hse_TranslateHseResponse function returns E_NOT_OK. I have done the memory handling of the data with reference to the demo project, for example
#define CRYPTO_START_SEC_VAR_INIT_8_NO_CACHEABLE
#define CRYPTO_STOP_SEC_VAR_INIT_8_NO_CACHEABLE.
I have checked that the values of the parameters passed are the same.
What should I do to solve this problem?
Hello @Cppppy,
Could you show me the line of code in the Hse_Ip_ServiceRequest() that occurred this error?
Best regards,
Dan
Hi,I also meet this problem.
/* Send the request to HSE driver */
HseResponse = Hse_Ip_ServiceRequest(u8MuInstance, u8MuChannel, pHseIpReq, pHseSrvDescriptor);
/* Translate the message received from HSE to a Std_ReturnType value */
RetVal = Crypto_Hse_TranslateHseResponse(HseResponse);
RetVal is CRYPTO_RET_OPERATION_TIMEOUT.
Yes, I refer to S32DS for S32 platform's Crypto demo. This question is in link(S32K324 Crypto returns CRYPTO_RET_OPERATION_TIMEOU... - NXP Community). When I debug App_Aes128EncryptDecryptExample in s32k324 board, it returns timeout error.
In the beginning of main(), it don't need to init clock or mcu(Mcal) module?
Hello @Faker,
Yes, because FIRC was initialized by the HSE core when POR.
Did you use correctly the chip's name (E5) with HSE FW release?
Best regards,
Dan
It means if custom board don't have external E5 chip, I can use software encryption library to replace it?
S32k324 needs external E5 chip to complete the function of security? There isn't E5 chip in my board.
I always think this module is just in mcu like some peripherals.
Hello @Faker,
In the HSE FW Reference noted that the HSE FW release was developed and tested using chip E5.
So, you can run HSE examples normally on this chip.
Best regards,
Dan
Hi:
I don't kwon what the E5 chip is . Do you have any other information?
In chapter 31 boot overview of S32K3XXRM.pdf, there is a table that shows some content about HSE FW.
Following this picture, K3 chip don't program HSE firmware by fault,so the crypto's function can't work?
Do you have some demos of generating random? Could I have a copy. Thank you.
Hi @Faker,
1. If your chip has "E5" on the surface, then it is an E5 chip.
2. Following this picture, K3 chip don't program HSE firmware by fault,so the crypto's function can't work? => That's correct.
3. Please use the chip correctly with the HSE FW version.
4.Do you have some demos of generating random?
=> Please refer to the Crypto example in the S32K3 package.
Best regards,
Dan
This's a chip(S32K324HMS) on my board. Don't have the prefix of "E5" . Does that mean I can't use encryption.
Hi @Faker,
Unfortunately, the S32K3 package was only tested on the S32K344, S32K312, and S32K342, and don't test with S32K324 because we don't have this derivative.
Hence, I can't ensure whether or not S32K324 can successfully load HSE FW.
From my point of view, you should try to install HSE FW and check whether the Crypto example can run successfully or not. If the result fails, this indicates that your chip can't load the HSE FW present.
Best regards,
Dan
OK.Thank you very much.
I will try it after agent hsa given me the file of s32k3x4_hse_fw_0.5.0_1.1.0_pb211004.bin.pink .