This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[NRF52 S132] high current after calling sd_ecb_block_encrypt()

Hi,

I'm using nrf52 with S132. I noticed high current draw after calling sd_ecb_block_encrypt() function. After calling function consumption is 6mA and stays at a constant level.

void AES_ECB_Encrypt(uint8_t *key, uint8_t *in, uint8_t *out)
{
	nrf_ecb_hal_data_t block;

	memcpy(block.key, key, sizeof(block.key));
	memcpy(block.cleartext, in, sizeof(block.cleartext));

	uint32_t err_code = sd_ecb_block_encrypt(&block);
	APP_ERROR_CHECK(err_code);

	memcpy(out, block.ciphertext, sizeof(block.ciphertext));
}

What could be the problem and how to avoid this situation?

Parents Reply Children
Related