cancel
Showing results for 
Search instead for 
Did you mean: 

HW AES with X-CUBE-CRYPTOLIB: using DMA?

Charles Seldon
Associate
Posted on October 19, 2017 at 11:21

Hello,

I am using the STM crypto library X-CUBE-CRYPTOLIB (there are several libraries and I could not find out which one was recommended so I picked the most recent one) with an STM32F417.

I can't find any information about the internal implementation. More specifically, I need to know if the AccHw_ AES routines use DMA. The CRYP_IN DMA stream is (2, 6), but my application requires SDIO on the same stream (I can't use stream (2,3) because it is needed by SPI1_TX).

My initial testing shows that the encryption seems to work despite the fact that the SDIO is on and active, but I need to understand *why* does it work and if I can rely on this behaviour.

Therefore, I have the following questions:

- Does X-CUBE-CRYPTOLIB uses DMA for the AES encryption?

    - If it does, how can it work in parallel with the SDIO?

    - If it does not, why? Does it uses interrupts? Polling? How can this be optimal?

- Can it be configured and how?

Thanks for any information that could help me sort this through.

Charles

#crypto #dma #aes #x-cube-cryptolib
1 REPLY 1
Amel NASRI
ST Employee
Posted on October 23, 2017 at 13:03

Hi

charles.sdn

‌,

X-CUBE-CRYPTOLIB doesn't use DMA for the AES encryption but developed based on polling mode. This is done to keep DMA streams available for other peripherals in the end user's application.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.