Hi @kerryzhou ,
I do not have EVKB board. Therefore, i am using my custom board.
I will try to explain my problem clearly. Also i downloaded SDK example which is caam_cm7 and used it as an example code.
In my code:
1) I set CAAM_Init().

2) I am reading encrypted bin file 256 bytes, decrypting it by using CAAM_AES_DecryptCbc() function and writing the data to flash.
First time of the loop, decyption process done successfully.


Second time of the loop, decryption process did not work but it returned success. After this point to end of the for loop, all decryption process will return 0s. Hence, i can not write correct main application to the flash.


Therefore, i think i am missing some important things. If you ask me, what did i do to solve this issue?
- I tried to find application note but i did not find which match with my problem.
- I tried to init Caam begining of the loop and deinit it end of the loop. It did not work.
- I used Caam_wait() function between multiple process. It did not work so,
What am i doing wrong? Can we solve this problem or should i write custom decryption firmware?
Best Regards,
Basri KAYA