Skip to main content
Thomas Chapelle
Associate
July 20, 2017
Solved

STM32F446 - STM32CryptographicV3.0.0 and CRC use

  • July 20, 2017
  • 2 replies
  • 1525 views
Posted on July 20, 2017 at 14:28

Hi all

I have a function using the STM32CryptographicV3.0.0 to do AES-CMAC encryption / decryption on a STM32F446. This works fine.

I have a function 

using the CRC peripheral of the

STM32F446 

to check the integrity of the flash. 

This works fine.

My problem is when doing both at the same time or sequentially, the call of

encryption / decryption of the lib seems to use the crc and mess with my flash CRC calculation. (CRC_DR is set to 0 after the call)

In the pdf CD00208802.pdf User manual STM32 Cryptographic Library, i found out the note : 'Note: 3. CRC peripheral is used ', so i guess it's pretty normal to have this behaviour.

Is there a way to do them at the same time ? or am i forced to do a pure crc software implementation for the check of my flash ? 

    This topic has been closed for replies.
    Best answer by Imen.D
    Posted on July 20, 2017 at 16:00

    Hi,

    Cryptolib use the CRC, so it's not possible to use CRC at the same time in Cryptolib and

    check of the flash.

    Imen

    2 replies

    Tesla DeLorean
    Guru
    July 20, 2017
    Posted on July 20, 2017 at 14:53

    Depends how frequently you check the FLASH.

    The library tests the CRC to confirm it is using STM32 hardware, if this annoyed me sufficiently I'd remove the test.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    July 20, 2017
    Posted on July 20, 2017 at 16:54

     ,

     ,

    Small table CRC example

     ,
    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Imen.DBest answer
    Technical Moderator
    July 20, 2017
    Posted on July 20, 2017 at 16:00

    Hi,

    Cryptolib use the CRC, so it's not possible to use CRC at the same time in Cryptolib and

    check of the flash.

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Tesla DeLorean
    Guru
    July 20, 2017
    Posted on July 20, 2017 at 16:35

    The complaint is that it doesn't need to interfere with the CRC peripheral, but does.

    Does the library contain public domain, open source or GPL code?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..