-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description of defect
When running simultaneously the BLE stack and the Wi-SUN interface, the application returns a Fatal Run-time error in the HAL_RNG_GenerateRandomNumber function. It doesn't happen until both WisunInterface and BLE are up.
After some investigation, I found out that the error occurs inside the stm32wbxx_hal_rng.c in line 574:
while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET)
{
if ((HAL_GetTick() - tickstart) > RNG_TIMEOUT_VALUE)
{
hrng->State = HAL_RNG_STATE_READY;
hrng->ErrorCode = HAL_RNG_ERROR_TIMEOUT;
/* Process Unlocked */
__HAL_UNLOCK(hrng);
return HAL_ERROR;
}
}
Target(s) affected by this defect ?
NUCLEO_WB55RG
Toolchain(s) (name and version) displaying this defect ?
GCC for Arm (gcc-arm-none-eabi-9-2019-q4-major)
What version of Mbed-os are you using (tag or sha) ?
mbed-os-6.0.0 (165be79)
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
mbed-cli 1.10.2
How is this defect reproduced ?
This issue occurs either when the BLE stack is started after the Wi-SUN interface is connected or when the Wi-SUN interface calls the connect method after the BLE initialization. It seems that the problem is related to both instances trying to access the TRNG.
I'm using the last version of the BLE Full stack firmware from STM32Cube_FW_WB_V1.7.0.