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?
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?
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
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