Skip to main content
SteveM
Associate
October 12, 2023
Question

STM32WB55 As soon as I init the CRYP module Bluetooth stops working

  • October 12, 2023
  • 0 replies
  • 605 views

I have a project on my STM32WB55 and have BLE working very well (it's using the latest stm32wb5x_BLE_Stack_full_fw.bin).  Everything was working great till I decided I wanted to use some AES function to hash some passwords.  Basically if I have my project without the CRYP module everything works great.  As soon as I add this to the init section in main, bluetooth never works again, function calls go to exception handlers. 

/***************** AES 128 ****************/

/* Initialize the CRYP peripheral */

hcryp1.Instance = AES1;

hcryp1.Init.DataType = CRYP_DATATYPE_32B;

hcryp1.Init.KeySize = CRYP_KEYSIZE_128B;

hcryp1.Init.pKey = (uint32_t *)pKeyAES1;

hcryp1.Init.Algorithm = CRYP_AES_ECB;

hcryp1.Init.DataWidthUnit = CRYP_DATAWIDTHUNIT_WORD;

hcryp1.Init.KeyIVConfigSkip = CRYP_KEYIVCONFIG_ALWAYS;

if (HAL_CRYP_Init(&hcryp1) != HAL_OK)

{

Error_Handler();

}

 

If I take the above out, everything is great. As soon as I do this, no more bluetooth. Anyone have any thoughts?

This topic has been closed for replies.