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
  • Hi,

    neo_here said:
    Yes, But while advertising we are not doing any crypto operations. Shouldn't the crypto module go to sleep when not used. 

    I have asked internally about the expected crypto module behavior.

    Please make sure that relevant peripherals are not enabled at the same time. Examples are serial drivers SPIM, TWIM and UART. 

    If all mentioned peripherals are disabled and you still see increased current draw, you could make a minimal sample which we could use for reproducing your issue on nrf5340-dk. Since I will be out of the office for the next 2 weeks, in case your issue requires urgent attention, you could open a new ticket where you would provide all necessary information.

    Best regards,
    Dejan

Children
No Data
Related