Power Optimization when using the Crypto Cell on nRF5340

Hey, I have been trying to get to the root of additional current draw when crypto drivers are enabled. 

Without the crypto drivers enabled the current draw between two advertisements is around 3-5uA, with crypto drivers enabled it shoots up to 80uA

I am using the Crypto APIs for HMAC signing. 

These are the config options enabled in prj.conf 

CONFIG_TFM_PROFILE_TYPE_NOT_SET=y        
CONFIG_PSA_CRYPTO_DRIVER_OBERON=n
CONFIG_PSA_CRYPTO_DRIVER_CC3XX=y
CONFIG_NRF_SECURITY=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_MBEDTLS_ENABLE_HEAP=n
As for the HMAC signing, I'm importing a key using psa_import_key() and signing using the psa_mac_ series of APIs for signing. 
I thought MBEDTLS might not be needed when hardware acceleration is used, but looks like it's being used during key import. 
 
Parents Reply
  • Hey, 

    I am using the Nordic nRF5340 DK and the Nordic PPK II in Ammeter mode. I'm using the supplied CR2032 cell for the measurements. 

    The BLE application starts advertising after initializing the peripherals needed. 

    I've followed the optimization recommendations and disabled the logging on both the images. 

    That's how I was able to get to about 3-5uA between advertisements. But once the crypto drivers were added to the project it increases this current to about 80uA as shown in the above screenshot. 

    CONFIG_TFM_PROFILE_TYPE_NOT_SET=y        
    CONFIG_PSA_CRYPTO_DRIVER_OBERON=n
    CONFIG_PSA_CRYPTO_DRIVER_CC3XX=y

    If I get rid of the above configs, the current consumption is back to 3-5uA. 

    The current consumption after a connection is established is much more in line with expectation. Just when the device is just advertising, between two advertisements the current consumption is a lot higher with the crypto drivers enabled. 
Children
Related