-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIC32MZ hardware support throws ASYNC_OP_E #1
Comments
I discovered what went wrong. In the harmony configurator I forgot to enable the RNG peripheral, after enabling the peripheral the crypto library generated the random numbers I wanted. Harmony generated:
Clearing the PMD7<22> bit:
But there is no way to enable the crypto engine in the harmony configurator as there is no crypto peripheral node to add, like how you add the RNG peripheral node. |
For my project I wanted SHA256 support and the random number generator. In the harmony configurator I enabled hardware support for both my requirements.
I looked in to the documentation and found the following:
The initialize function fails with error code -209 (DRBG_CONT_FIPS_E).
But the initialize function tries to preform a sha256 operations with fails which I will mention below.
The initialize function fails with error code -245 (ASYNC_OP_E).
After going line by line with the debugger I stumbled on the while-wait loop that times out in
pic32mz-crypt.c Pic32Crypto()
the
CEINTSRCbits.PKTIF
seems to be never set to 1.I looked up what this function does and compared it with the PIC32MZ datasheet and this function seems to enable al the right registers.
Maybe I forgot to setup/initialize something in the project but I can't find anything in the Harmony documentation files.
The text was updated successfully, but these errors were encountered: