-
Main Changes
+
Main Changes
First Official Release of STM32CubeWBA Firmware package supporting STM32WBA52xx devices
-
Contents
+
Contents
First Official Release of HAL/LL Drivers for STM32WBAxx serie
- HAL/LL Drivers are available for all peripherals:
@@ -522,24 +661,24 @@
First Offi
-
Supported Devices and boards
+
Supported Devices and boards
- STM32WBA52xx devices
- NUCLEO-WBA52CG board
-
Backward compatibility
+
Backward compatibility
-
Known Limitations
+
Known Limitations
-
Dependencies
+
Dependencies
-
Notes
+
Notes
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma.c
index a4e3e243df..37c483f682 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma.c
@@ -238,6 +238,7 @@ static void DMA_Init(DMA_HandleTypeDef const *const hdma);
*/
HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *const hdma)
{
+
/* Get tick number */
uint32_t tickstart = HAL_GetTick();
@@ -270,6 +271,7 @@ HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *const hdma)
assert_param(IS_DMA_TRANSFER_ALLOCATED_PORT(hdma->Init.TransferAllocatedPort));
}
+
/* Allocate lock resource */
__HAL_UNLOCK(hdma);
@@ -1524,7 +1526,7 @@ HAL_StatusTypeDef HAL_DMA_LockChannelAttributes(DMA_HandleTypeDef const *const h
*/
HAL_StatusTypeDef HAL_DMA_GetLockChannelAttributes(DMA_HandleTypeDef const *const hdma, uint32_t *const pLockState)
{
- DMA_TypeDef *p_dma_instance;
+ const DMA_TypeDef *p_dma_instance;
uint32_t channel_idx;
/* Check the DMA peripheral handle and lock state parameters */
@@ -1648,7 +1650,6 @@ static void DMA_Init(DMA_HandleTypeDef const *const hdma)
MODIFY_REG(hdma->Instance->CTR2, (DMA_CTR2_TCEM | DMA_CTR2_TRIGPOL | DMA_CTR2_TRIGSEL | DMA_CTR2_TRIGM |
DMA_CTR2_BREQ | DMA_CTR2_DREQ | DMA_CTR2_SWREQ | DMA_CTR2_REQSEL), tmpreg);
-
/* Write DMA Channel Block Register 1 (CBR1) ************************************************************************/
WRITE_REG(hdma->Instance->CBR1, 0U);
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma_ex.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma_ex.c
index 4a02639bb7..fe23e92ece 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma_ex.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma_ex.c
@@ -637,7 +637,6 @@ HAL_StatusTypeDef HAL_DMAEx_List_DeInit(DMA_HandleTypeDef *const hdma)
/* Get DMA instance */
DMA_TypeDef *p_dma_instance;
#endif /* DMA_PRIVCFGR_PRIV0 */
-
/* Get tick number */
uint32_t tickstart = HAL_GetTick();
@@ -654,7 +653,6 @@ HAL_StatusTypeDef HAL_DMAEx_List_DeInit(DMA_HandleTypeDef *const hdma)
/* Get DMA instance */
p_dma_instance = GET_DMA_INSTANCE(hdma);
#endif /* DMA_PRIVCFGR_PRIV0 */
-
/* Disable the selected DMA Channel */
__HAL_DMA_DISABLE(hdma);
@@ -3199,6 +3197,7 @@ HAL_StatusTypeDef HAL_DMAEx_ConfigDataHandling(DMA_HandleTypeDef *const hdma,
{
MODIFY_REG(hdma->Instance->CTR1, (DMA_CTR1_DHX | DMA_CTR1_DBX | DMA_CTR1_SBX | DMA_CTR1_PAM),
(pConfigDataHandling->DataAlignment | pConfigDataHandling->DataExchange));
+
}
else
{
@@ -3452,6 +3451,7 @@ uint32_t HAL_DMAEx_GetFifoLevel(DMA_HandleTypeDef const *const hdma)
{
return ((hdma->Instance->CSR & DMA_CSR_FIFOL) >> DMA_CSR_FIFOL_Pos);
}
+
/**
* @}
*/
@@ -3560,7 +3560,6 @@ static void DMA_List_BuildNode(DMA_NodeConfTypeDef const *const pNodeConfig,
/* Check for memory to peripheral transfer */
if ((pNodeConfig->Init.Direction) == DMA_MEMORY_TO_PERIPH)
{
- /* Check for GPDMA */
if ((pNodeConfig->NodeType & DMA_CHANNEL_TYPE_GPDMA) == DMA_CHANNEL_TYPE_GPDMA)
{
pNode->LinkRegisters[NODE_CTR2_DEFAULT_OFFSET] |= DMA_CTR2_DREQ;
@@ -3603,6 +3602,10 @@ static void DMA_List_BuildNode(DMA_NodeConfTypeDef const *const pNodeConfig,
pNode->LinkRegisters[NODE_CDAR_DEFAULT_OFFSET] = pNodeConfig->DstAddress;
/*********************************************************************************** CDAR register value is updated */
+ /* Update CLLR register value *************************************************************************************/
+ /* Reset CLLR Register value : channel linked-list address register offset */
+ pNode->LinkRegisters[NODE_CLLR_LINEAR_DEFAULT_OFFSET] = 0U;
+ /********************************************************************************* CLLR register value is cleared */
/* Update node information value ************************************************************************************/
/* Set node information */
@@ -3641,6 +3644,7 @@ static void DMA_List_GetNodeConfig(DMA_NodeConfTypeDef *const pNodeConfig,
(DMA_CTR1_SAP | DMA_CTR1_DAP);
pNodeConfig->DataHandlingConfig.DataExchange = pNode->LinkRegisters[NODE_CTR1_DEFAULT_OFFSET] &
(DMA_CTR1_SBX | DMA_CTR1_DBX | DMA_CTR1_DHX);
+
pNodeConfig->DataHandlingConfig.DataAlignment = pNode->LinkRegisters[NODE_CTR1_DEFAULT_OFFSET] & DMA_CTR1_PAM;
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
if ((pNode->LinkRegisters[NODE_CTR1_DEFAULT_OFFSET] & DMA_CTR1_SSEC) != 0U)
@@ -4071,7 +4075,7 @@ static void DMA_List_ConvertNodeToStatic(uint32_t ContextNodeAddr,
uint32_t contextnode_reg_counter = 0U;
uint32_t cllr_idx;
uint32_t cllr_mask;
- DMA_NodeTypeDef *context_node = (DMA_NodeTypeDef *)ContextNodeAddr;
+ const DMA_NodeTypeDef *context_node = (DMA_NodeTypeDef *)ContextNodeAddr;
DMA_NodeTypeDef *current_node = (DMA_NodeTypeDef *)CurrentNodeAddr;
uint32_t update_link[NODE_MAXIMUM_SIZE] = {DMA_CLLR_UT1, DMA_CLLR_UT2, DMA_CLLR_UB1, DMA_CLLR_USA,
DMA_CLLR_UDA, DMA_CLLR_ULL
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_flash_ex.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_flash_ex.c
index 9f95483992..f69e4acff0 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_flash_ex.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_flash_ex.c
@@ -582,8 +582,10 @@ void HAL_FLASHEx_EnableSecHideProtection(uint32_t Banks)
SET_BIT(FLASH->SECHDPCR, FLASH_SECHDPCR_HDP_ACCDIS);
}
+
#endif /* __ARM_FEATURE_CMSE */
+
/**
* @}
*/
@@ -1116,8 +1118,8 @@ static void FLASH_OB_RDPConfig(uint32_t RDPLevel)
* This parameter can be one of the following values:
* @arg @ref OB_RDP_KEY_OEM1 OEM1 key
* @arg @ref OB_RDP_KEY_OEM2 OEM2 key
- * @param RDPKey1 Specifies the RDP key 1.
- * @param RDPKey2 Specifies the RDP key 2.
+ * @param RDPKey1 Specifies the RDP key bits[0:31].
+ * @param RDPKey2 Specifies the RDP key bits[32:63].
* @retval None
*/
static void FLASH_OB_RDPKeyConfig(uint32_t RDPKeyType, uint32_t RDPKey1, uint32_t RDPKey2)
@@ -1289,6 +1291,7 @@ static void FLASH_OB_UserConfig(uint32_t UserType, uint32_t UserConfig)
}
+
#if defined(FLASH_OPTR_TZEN)
if ((UserType & OB_USER_TZEN) != 0U)
{
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_gtzc.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_gtzc.c
index c0cf9910fe..0231d33878 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_gtzc.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_gtzc.c
@@ -113,7 +113,7 @@
/* Definitions for GTZC TZSC & TZIC ALL register values */
/* TZSC1 / TZIC1 instances */
-#if defined (STM32WBA54xx) || defined (STM32WBA55xx)
+#if defined (STM32WBA54xx) || defined (STM32WBA55xx) || defined(STM32WBA5Mxx)
#define TZSC1_SECCFGR1_ALL (0x000222C3UL)
#define TZSC1_SECCFGR2_ALL (0x018F00EBUL)
#define TZSC1_SECCFGR3_ALL (0x01C17858UL)
@@ -123,7 +123,7 @@
#define TZSC1_SECCFGR2_ALL (0x010F006BUL)
#define TZSC1_SECCFGR3_ALL (0x00C17858UL)
#define TZIC1_IER4_ALL (0xC3C0EF87UL)
-#endif /* STM32WBA54xx || STM32WBA55xx */
+#endif /* STM32WBA54xx || STM32WBA55xx || STM32WBA5Mxx */
#define TZSC1_PRIVCFGR1_ALL TZSC1_SECCFGR1_ALL
#define TZSC1_PRIVCFGR2_ALL TZSC1_SECCFGR2_ALL
@@ -560,14 +560,12 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_ConfigMem(uint32_t MemBaseAddress,
mpcbb_ptr = GTZC_MPCBB2;
mem_size = GTZC_MEM_SIZE(SRAM2);
}
-#if defined(GTZC_MPCBB6)
else
{
/* Here MemBaseAddress is inside SRAM6 (parameter already checked) */
mpcbb_ptr = GTZC_MPCBB6;
mem_size = GTZC_MEM_SIZE(SRAM6);
}
-#endif /* GTZC_MPCBB6 */
/* translate mem_size in number of super-blocks */
size_in_superblocks = (mem_size / GTZC_MPCBB_SUPERBLOCK_SIZE);
@@ -633,13 +631,11 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_GetConfigMem(uint32_t MemBaseAddress,
mpcbb_ptr = GTZC_MPCBB2;
mem_size = GTZC_MEM_SIZE(SRAM2);
}
-#if defined(GTZC_MPCBB6)
else
{
mpcbb_ptr = GTZC_MPCBB6;
mem_size = GTZC_MEM_SIZE(SRAM6);
}
-#endif /* GTZC_MPCBB6 */
/* translate mem_size in number of super-blocks */
size_in_superblocks = (mem_size / GTZC_MPCBB_SUPERBLOCK_SIZE);
@@ -729,7 +725,6 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_ConfigMemAttributes(uint32_t MemAddress,
base_address = SRAM2_BASE_S;
}
#endif /* #if defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
-#if defined(GTZC_MPCBB6)
else if (((IS_ADDRESS_IN_NS(SRAM6, MemAddress))
&& (IS_ADDRESS_IN_NS(SRAM6, end_address))) != 0U)
{
@@ -744,7 +739,6 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_ConfigMemAttributes(uint32_t MemAddress,
base_address = SRAM6_BASE_S;
}
#endif /* #if defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
-#endif /* GTZC_MPCBB6 */
else
{
return HAL_ERROR;
@@ -876,7 +870,6 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_GetConfigMemAttributes(uint32_t MemAddress,
base_address = SRAM2_BASE_S;
}
#endif /* #if defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
-#if defined(GTZC_MPCBB6)
else if ((IS_ADDRESS_IN_NS(SRAM6, MemAddress))
&& (IS_ADDRESS_IN_NS(SRAM6, end_address)))
{
@@ -891,7 +884,6 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_GetConfigMemAttributes(uint32_t MemAddress,
base_address = SRAM6_BASE_S;
}
#endif /* #if defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
-#endif /* GTZC_MPCBB6 */
else
{
return HAL_ERROR;
@@ -971,7 +963,6 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_LockConfig(uint32_t MemAddress,
reg_mpcbb = (__IO uint32_t *)>ZC_MPCBB2_S->CFGLOCK;
}
-#if defined(GTZC_MPCBB6)
else if ((IS_ADDRESS_IN(SRAM6, MemAddress))
&& (IS_ADDRESS_IN(SRAM6, (MemAddress
+ (NbSuperBlocks * GTZC_MPCBB_SUPERBLOCK_SIZE)
@@ -981,7 +972,6 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_LockConfig(uint32_t MemAddress,
/* limitation: code not portable with memory > 512K */
reg_mpcbb = (__IO uint32_t *)>ZC_MPCBB6_S->CFGLOCK;
}
-#endif /* GTZC_MPCBB6 */
else
{
return HAL_ERROR;
@@ -1066,7 +1056,6 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_GetLockConfig(uint32_t MemAddress,
/* limitation: code not portable with memory > 512K */
reg_mpcbb = GTZC_MPCBB2_S->CFGLOCK;
}
-#if defined(GTZC_MPCBB6)
else if ((IS_ADDRESS_IN(SRAM6, MemAddress))
&& (IS_ADDRESS_IN(SRAM6, (MemAddress
+ (NbSuperBlocks
@@ -1077,7 +1066,6 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_GetLockConfig(uint32_t MemAddress,
/* limitation: code not portable with memory > 512K */
reg_mpcbb = GTZC_MPCBB6_S->CFGLOCK;
}
-#endif /* GTZC_MPCBB6 */
else
{
return HAL_ERROR;
@@ -1114,12 +1102,10 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_Lock(uint32_t MemBaseAddress)
{
SET_BIT(GTZC_MPCBB2_S->CR, GTZC_MPCBB_CR_GLOCK_Msk);
}
-#if defined(GTZC_MPCBB6)
else if (IS_GTZC_BASE_ADDRESS(SRAM6, MemBaseAddress))
{
SET_BIT(GTZC_MPCBB6_S->CR, GTZC_MPCBB_CR_GLOCK_Msk);
}
-#endif /* GTZC_MPCBB6 */
else
{
return HAL_ERROR;
@@ -1146,12 +1132,10 @@ HAL_StatusTypeDef HAL_GTZC_MPCBB_GetLock(uint32_t MemBaseAddress,
{
*pLockState = READ_BIT(GTZC_MPCBB2_S->CR, GTZC_MPCBB_CR_GLOCK_Msk);
}
-#if defined(GTZC_MPCBB6)
else if (IS_GTZC_BASE_ADDRESS(SRAM6, MemBaseAddress))
{
*pLockState = READ_BIT(GTZC_MPCBB6_S->CR, GTZC_MPCBB_CR_GLOCK_Msk);
}
-#endif /* GTZC_MPCBB6 */
else
{
return HAL_ERROR;
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_i2c.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_i2c.c
index 1f67b9d949..4c9b7a5df3 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_i2c.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_i2c.c
@@ -3458,6 +3458,8 @@ HAL_StatusTypeDef HAL_I2C_IsDeviceReady(I2C_HandleTypeDef *hi2c, uint16_t DevAdd
__IO uint32_t I2C_Trials = 0UL;
+ HAL_StatusTypeDef status = HAL_OK;
+
FlagStatus tmp1;
FlagStatus tmp2;
@@ -3515,37 +3517,64 @@ HAL_StatusTypeDef HAL_I2C_IsDeviceReady(I2C_HandleTypeDef *hi2c, uint16_t DevAdd
/* Wait until STOPF flag is reset */
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_STOPF, RESET, Timeout, tickstart) != HAL_OK)
{
- return HAL_ERROR;
+ /* A non acknowledge appear during STOP Flag waiting process, a new trial must be performed */
+ if (hi2c->ErrorCode == HAL_I2C_ERROR_AF)
+ {
+ /* Clear STOP Flag */
+ __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
+
+ /* Reset the error code for next trial */
+ hi2c->ErrorCode = HAL_I2C_ERROR_NONE;
+ }
+ else
+ {
+ status = HAL_ERROR;
+ }
}
+ else
+ {
+ /* A acknowledge appear during STOP Flag waiting process, this mean that device respond to its address */
- /* Clear STOP Flag */
- __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
+ /* Clear STOP Flag */
+ __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
- /* Device is ready */
- hi2c->State = HAL_I2C_STATE_READY;
+ /* Device is ready */
+ hi2c->State = HAL_I2C_STATE_READY;
- /* Process Unlocked */
- __HAL_UNLOCK(hi2c);
+ /* Process Unlocked */
+ __HAL_UNLOCK(hi2c);
- return HAL_OK;
+ return HAL_OK;
+ }
}
else
{
- /* Wait until STOPF flag is reset */
- if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_STOPF, RESET, Timeout, tickstart) != HAL_OK)
- {
- return HAL_ERROR;
- }
+ /* A non acknowledge is detected, this mean that device not respond to its address,
+ a new trial must be performed */
/* Clear NACK Flag */
__HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF);
- /* Clear STOP Flag, auto generated with autoend*/
- __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
+ /* Wait until STOPF flag is reset */
+ if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_STOPF, RESET, Timeout, tickstart) != HAL_OK)
+ {
+ status = HAL_ERROR;
+ }
+ else
+ {
+ /* Clear STOP Flag, auto generated with autoend*/
+ __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF);
+ }
}
/* Increment Trials */
I2C_Trials++;
+
+ if ((I2C_Trials < Trials) && (status == HAL_ERROR))
+ {
+ status = HAL_OK;
+ }
+
} while (I2C_Trials < Trials);
/* Update I2C state */
@@ -7624,15 +7653,17 @@ static HAL_StatusTypeDef I2C_IsErrorOccurred(I2C_HandleTypeDef *hi2c, uint32_t T
static void I2C_TransferConfig(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t Size, uint32_t Mode,
uint32_t Request)
{
+ uint32_t tmp;
+
/* Check the parameters */
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
assert_param(IS_TRANSFER_MODE(Mode));
assert_param(IS_TRANSFER_REQUEST(Request));
/* Declaration of tmp to prevent undefined behavior of volatile usage */
- uint32_t tmp = ((uint32_t)(((uint32_t)DevAddress & I2C_CR2_SADD) | \
- (((uint32_t)Size << I2C_CR2_NBYTES_Pos) & I2C_CR2_NBYTES) | \
- (uint32_t)Mode | (uint32_t)Request) & (~0x80000000U));
+ tmp = ((uint32_t)(((uint32_t)DevAddress & I2C_CR2_SADD) | \
+ (((uint32_t)Size << I2C_CR2_NBYTES_Pos) & I2C_CR2_NBYTES) | \
+ (uint32_t)Mode | (uint32_t)Request) & (~0x80000000U));
/* update CR2 register */
MODIFY_REG(hi2c->Instance->CR2, \
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pka.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pka.c
index 961b4b300b..2acc1915ba 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pka.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pka.c
@@ -276,6 +276,7 @@
* @{
*/
#define PKA_RAM_SIZE 1334U
+#define PKA_RAM_ERASE_TIMEOUT 1000U
/* Private macro -------------------------------------------------------------*/
#define __PKA_RAM_PARAM_END(TAB,INDEX) do{ \
@@ -287,9 +288,6 @@
*/
/* Private variables ---------------------------------------------------------*/
-static uint32_t primeordersize;
-static uint32_t opsize;
-static uint32_t modulussize;
/* Private function prototypes -----------------------------------------------*/
/** @defgroup PKA_Private_Functions PKA Private Functions
* @{
@@ -399,8 +397,22 @@ HAL_StatusTypeDef HAL_PKA_Init(PKA_HandleTypeDef *hpka)
/* Set the state to busy */
hpka->State = HAL_PKA_STATE_BUSY;
- /* Reset the control register and enable the PKA */
- hpka->Instance->CR = PKA_CR_EN;
+ /* Get current tick */
+ tickstart = HAL_GetTick();
+
+ /* Reset the control register and enable the PKA (wait the end of PKA RAM erase) */
+ while ((hpka->Instance->CR & PKA_CR_EN) != PKA_CR_EN)
+ {
+ hpka->Instance->CR = PKA_CR_EN;
+
+ /* Check the Timeout */
+ if ((HAL_GetTick() - tickstart) > PKA_RAM_ERASE_TIMEOUT)
+ {
+ /* Set timeout status */
+ err = HAL_TIMEOUT;
+ break;
+ }
+ }
/* Get current tick */
tickstart = HAL_GetTick();
@@ -502,12 +514,50 @@ __weak void HAL_PKA_MspInit(PKA_HandleTypeDef *hpka)
*/
__weak void HAL_PKA_MspDeInit(PKA_HandleTypeDef *hpka)
{
- /* Prevent unused argument(s) compilation warning */
- UNUSED(hpka);
-
- /* NOTE : This function should not be modified, when the callback is needed,
+ /* NOTE : This function should not be modified,
the HAL_PKA_MspDeInit can be implemented in the user file
+ user should take into consideration PKA RAM erase when resetting PKA
*/
+ uint32_t tickstart = HAL_GetTick();
+
+ /* Enable PKA reset state */
+ __HAL_RCC_PKA_FORCE_RESET();
+
+ /* Release PKA from reset state */
+ __HAL_RCC_PKA_RELEASE_RESET();
+
+ /* Wait the INITOK flag Setting */
+ while (hpka->Instance->CR != PKA_CR_EN)
+ {
+ hpka->Instance->CR = PKA_CR_EN;
+
+ /* Check for the Timeout */
+ if ((HAL_GetTick() - tickstart) > PKA_RAM_ERASE_TIMEOUT)
+ {
+ /* update the state */
+ hpka->State = HAL_PKA_STATE_ERROR;
+ }
+ }
+
+ /* Get current tick */
+ tickstart = HAL_GetTick();
+
+ /* Wait the INITOK flag Setting */
+ if (PKA_WaitOnFlagUntilTimeout(hpka, PKA_SR_INITOK, RESET, tickstart, PKA_RAM_ERASE_TIMEOUT) != HAL_OK)
+ {
+ /* update the state */
+ hpka->State = HAL_PKA_STATE_ERROR;
+ }
+
+ /* Reset any pending flag */
+ SET_BIT(hpka->Instance->CLRFR, PKA_CLRFR_PROCENDFC | PKA_CLRFR_RAMERRFC | PKA_CLRFR_ADDRERRFC | PKA_CLRFR_OPERRFC);
+
+ /* PKA Periph clock disable */
+ hpka->Instance->CR = 0;
+ __HAL_RCC_PKA_CLK_DISABLE();
+
+ /* PKA Periph IRQ disable */
+ HAL_NVIC_DisableIRQ(PKA_IRQn);
}
#if (USE_HAL_PKA_REGISTER_CALLBACKS == 1)
@@ -811,9 +861,7 @@ HAL_StatusTypeDef HAL_PKA_ModExp(PKA_HandleTypeDef *hpka, PKA_ModExpInTypeDef *i
{
/* Set input parameter in PKA RAM */
PKA_ModExp_Set(hpka, in);
-
- opsize = in->OpSize;
-
+ hpka->opsize = in->OpSize;
/* Start the operation */
return PKA_Process(hpka, PKA_MODE_MODULAR_EXP, Timeout);
}
@@ -828,9 +876,7 @@ HAL_StatusTypeDef HAL_PKA_ModExp_IT(PKA_HandleTypeDef *hpka, PKA_ModExpInTypeDef
{
/* Set input parameter in PKA RAM */
PKA_ModExp_Set(hpka, in);
-
- opsize = in->OpSize;
-
+ hpka->opsize = in->OpSize;
/* Start the operation */
return PKA_Process_IT(hpka, PKA_MODE_MODULAR_EXP);
}
@@ -846,9 +892,7 @@ HAL_StatusTypeDef HAL_PKA_ModExpFastMode(PKA_HandleTypeDef *hpka, PKA_ModExpFast
{
/* Set input parameter in PKA RAM */
PKA_ModExpFastMode_Set(hpka, in);
-
- opsize = in->OpSize;
-
+ hpka->opsize = in->OpSize;
/* Start the operation */
return PKA_Process(hpka, PKA_MODE_MODULAR_EXP_FAST_MODE, Timeout);
}
@@ -863,9 +907,7 @@ HAL_StatusTypeDef HAL_PKA_ModExpFastMode_IT(PKA_HandleTypeDef *hpka, PKA_ModExpF
{
/* Set input parameter in PKA RAM */
PKA_ModExpFastMode_Set(hpka, in);
-
- opsize = in->OpSize;
-
+ hpka->opsize = in->OpSize;
/* Start the operation */
return PKA_Process_IT(hpka, PKA_MODE_MODULAR_EXP_FAST_MODE);
}
@@ -883,9 +925,7 @@ HAL_StatusTypeDef HAL_PKA_ModExpProtectMode(PKA_HandleTypeDef *hpka, PKA_ModExpP
{
/* Set input parameter in PKA RAM */
PKA_ModExpProtectMode_Set(hpka, in);
-
- opsize = in->OpSize;
-
+ hpka->opsize = in->OpSize;
return PKA_Process(hpka, PKA_MODE_MODULAR_EXP_PROTECT, Timeout);
}
@@ -900,9 +940,7 @@ HAL_StatusTypeDef HAL_PKA_ModExpProtectMode_IT(PKA_HandleTypeDef *hpka, PKA_ModE
{
/* Set input parameter in PKA RAM */
PKA_ModExpProtectMode_Set(hpka, in);
-
- opsize = in->OpSize;
-
+ hpka->opsize = in->OpSize;
return PKA_Process_IT(hpka, PKA_MODE_MODULAR_EXP_PROTECT);
}
@@ -918,7 +956,7 @@ void HAL_PKA_ModExp_GetResult(PKA_HandleTypeDef *hpka, uint8_t *pRes)
uint32_t size;
/* Get output result size */
- size = opsize;
+ size = hpka->opsize;
/* Move the result to appropriate location (indicated in out parameter) */
PKA_Memcpy_u32_to_u8(pRes, &hpka->Instance->RAM[PKA_MODULAR_EXP_OUT_RESULT], size);
@@ -935,9 +973,7 @@ HAL_StatusTypeDef HAL_PKA_ECDSASign(PKA_HandleTypeDef *hpka, PKA_ECDSASignInType
{
/* Set input parameter in PKA RAM */
PKA_ECDSASign_Set(hpka, in);
-
- primeordersize = in->primeOrderSize;
-
+ hpka->primeordersize = in->primeOrderSize;
/* Start the operation */
return PKA_Process(hpka, PKA_MODE_ECDSA_SIGNATURE, Timeout);
}
@@ -952,9 +988,7 @@ HAL_StatusTypeDef HAL_PKA_ECDSASign_IT(PKA_HandleTypeDef *hpka, PKA_ECDSASignInT
{
/* Set input parameter in PKA RAM */
PKA_ECDSASign_Set(hpka, in);
-
- primeordersize = in->primeOrderSize;
-
+ hpka->primeordersize = in->primeOrderSize;
/* Start the operation */
return PKA_Process_IT(hpka, PKA_MODE_ECDSA_SIGNATURE);
}
@@ -971,7 +1005,7 @@ void HAL_PKA_ECDSASign_GetResult(PKA_HandleTypeDef *hpka, PKA_ECDSASignOutTypeDe
uint32_t size;
/* Get output result size */
- size = primeordersize;
+ size = hpka->primeordersize;
if (out != NULL)
@@ -1087,11 +1121,18 @@ void HAL_PKA_RSACRTExp_GetResult(PKA_HandleTypeDef *hpka, uint8_t *pRes)
*/
HAL_StatusTypeDef HAL_PKA_PointCheck(PKA_HandleTypeDef *hpka, PKA_PointCheckInTypeDef *in, uint32_t Timeout)
{
- /* Set input parameter in PKA RAM */
- PKA_PointCheck_Set(hpka, in);
+ if ((in->pMontgomeryParam) != NULL)
+ {
+ /* Set input parameter in PKA RAM */
+ PKA_PointCheck_Set(hpka, in);
- /* Start the operation */
- return PKA_Process(hpka, PKA_MODE_POINT_CHECK, Timeout);
+ /* Start the operation */
+ return PKA_Process(hpka, PKA_MODE_POINT_CHECK, Timeout);
+ }
+ else
+ {
+ return HAL_ERROR;
+ }
}
/**
@@ -1102,11 +1143,18 @@ HAL_StatusTypeDef HAL_PKA_PointCheck(PKA_HandleTypeDef *hpka, PKA_PointCheckInTy
*/
HAL_StatusTypeDef HAL_PKA_PointCheck_IT(PKA_HandleTypeDef *hpka, PKA_PointCheckInTypeDef *in)
{
- /* Set input parameter in PKA RAM */
- PKA_PointCheck_Set(hpka, in);
+ if ((in->pMontgomeryParam) != NULL)
+ {
+ /* Set input parameter in PKA RAM */
+ PKA_PointCheck_Set(hpka, in);
- /* Start the operation */
- return PKA_Process_IT(hpka, PKA_MODE_POINT_CHECK);
+ /* Start the operation */
+ return PKA_Process_IT(hpka, PKA_MODE_POINT_CHECK);
+ }
+ else
+ {
+ return HAL_ERROR;
+ }
}
/**
@@ -1132,9 +1180,7 @@ HAL_StatusTypeDef HAL_PKA_ECCMul(PKA_HandleTypeDef *hpka, PKA_ECCMulInTypeDef *i
{
/* Set input parameter in PKA RAM */
PKA_ECCMul_Set(hpka, in);
-
- modulussize = in->modulusSize;
-
+ hpka->modulussize = in->modulusSize;
/* Start the operation */
return PKA_Process(hpka, PKA_MODE_ECC_MUL, Timeout);
}
@@ -1149,9 +1195,7 @@ HAL_StatusTypeDef HAL_PKA_ECCMul_IT(PKA_HandleTypeDef *hpka, PKA_ECCMulInTypeDef
{
/* Set input parameter in PKA RAM */
PKA_ECCMul_Set(hpka, in);
-
- modulussize = in->modulusSize;
-
+ hpka->modulussize = in->modulusSize;
/* Start the operation */
return PKA_Process_IT(hpka, PKA_MODE_ECC_MUL);
}
@@ -1166,9 +1210,7 @@ HAL_StatusTypeDef HAL_PKA_ECCMulEx(PKA_HandleTypeDef *hpka, PKA_ECCMulExInTypeDe
{
/* Set input parameter in PKA RAM */
PKA_ECCMulEx_Set(hpka, in);
-
- modulussize = in->modulusSize;
-
+ hpka->modulussize = in->modulusSize;
/* Start the operation */
return PKA_Process(hpka, PKA_MODE_ECC_MUL, Timeout);
}
@@ -1183,9 +1225,7 @@ HAL_StatusTypeDef HAL_PKA_ECCMulEx_IT(PKA_HandleTypeDef *hpka, PKA_ECCMulExInTyp
{
/* Set input parameter in PKA RAM */
PKA_ECCMulEx_Set(hpka, in);
-
- modulussize = in->modulusSize;
-
+ hpka->modulussize = in->modulusSize;
/* Start the operation */
return PKA_Process_IT(hpka, PKA_MODE_ECC_MUL);
}
@@ -1200,7 +1240,7 @@ void HAL_PKA_ECCMul_GetResult(PKA_HandleTypeDef *hpka, PKA_ECCMulOutTypeDef *out
uint32_t size;
/* Get output result size */
- size = modulussize;
+ size = hpka->modulussize;
/* If a destination buffer is provided */
if (out != NULL)
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pwr.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pwr.c
index 0bb4c5bfb0..ab11a8af5a 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pwr.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pwr.c
@@ -491,8 +491,8 @@ void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPin)
* @arg @ref PWR_WAKEUP_PIN2
* @arg @ref PWR_WAKEUP_PIN3
* @arg @ref PWR_WAKEUP_PIN4
- * @arg @ref PWR_WAKEUP_PIN6
* @arg @ref PWR_WAKEUP_PIN5
+ * @arg @ref PWR_WAKEUP_PIN6
* @arg @ref PWR_WAKEUP_PIN7
* @arg @ref PWR_WAKEUP_PIN8
* @retval None
@@ -514,8 +514,8 @@ void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPin)
* @arg @ref PWR_WAKEUP_PIN2
* @arg @ref PWR_WAKEUP_PIN3
* @arg @ref PWR_WAKEUP_PIN4
- * @arg @ref PWR_WAKEUP_PIN6
* @arg @ref PWR_WAKEUP_PIN5
+ * @arg @ref PWR_WAKEUP_PIN6
* @arg @ref PWR_WAKEUP_PIN7
* @arg @ref PWR_WAKEUP_PIN8
*/
@@ -1026,6 +1026,13 @@ __weak void HAL_PWR_WKUP8_Callback(void)
* privileged access.
* @note Privilege attribute for nsecure items can be managed by a secure
* privileged access or by a nsecure privileged access.
+ * @note As the privileged attributes concern either all secure or all non-secure
+ * PWR resources accesses and not each PWR individual items access attribute,
+ * the application must ensure that the privilege access attribute configurations
+ * are coherent amongst the security level set on PWR individual items so not to
+ * overwrite a previous more restricted access rule (consider either all secure
+ * and/or all non-secure PWR resources accesses by privileged-only transactions
+ * or privileged and unprivileged transactions).
* @param Item : Specifies the item(s) to set attributes on.
* This parameter can be a combination of PWR_ITEMS.
* @param Attributes : Specifies the available attribute(s).
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pwr_ex.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pwr_ex.c
index c9183a4517..44d3161dce 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pwr_ex.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pwr_ex.c
@@ -109,7 +109,7 @@
/** @defgroup PWR_Extended_Private_Defines PWR Extended Private Defines
* @{
*/
-#if defined(STM32WBA52xx) || defined(STM32WBA54xx) || defined(STM32WBA55xx)
+#if defined(STM32WBA52xx) || defined(STM32WBA54xx) || defined(STM32WBA55xx) || defined(STM32WBA5Mxx)
#define PWR_PORTA_AVAILABLE_PINS (0x0FFFFU)
#define PWR_PORTB_AVAILABLE_PINS (0x0FFFFU)
#define PWR_PORTC_AVAILABLE_PINS (0x0E000U)
@@ -119,7 +119,7 @@
#define PWR_PORTB_AVAILABLE_PINS (0x09318U)
#define PWR_PORTC_AVAILABLE_PINS (0x0C000U)
#define PWR_PORTH_AVAILABLE_PINS (0x00008U)
-#endif /* defined(STM32WBA52xx) || defined(STM32WBA54xx) || defined(STM32WBA55xx) */
+#endif /* defined(STM32WBA52xx) || defined(STM32WBA54xx) || defined(STM32WBA55xx) || defined(STM32WBA5Mxx) */
/*!< Time out value of flags setting */
#define PWR_VOSF_SETTING_DELAY_VALUE (0x32U) /*!< Time out value for VOSF flag setting */
#define PWR_MODE_CHANGE_DELAY_VALUE (0x32U) /*!< Time out for step down converter operating mode */
@@ -532,9 +532,9 @@ void HAL_PWREx_DisableRadioSRAMClockStandbyRetention(void)
* stop modes otherwise an hard fault may occur when waking up from stop modes.
* @param RAMSelection: Specifies RAMs content to be retained in Stop mode.
* This parameter can be one or a combination of the values:
- * @arg PWR_SRAM1_FULL_STOP_RETENTION : full SRAM1 retention .
- * @arg PWR_SRAM2_FULL_STOP_RETENTION : full SRAM2 retention.
- * @arg PWR_ICACHE_FULL_STOP_RETENTION : I-CACHE SRAM retention.
+ * @arg PWR_SRAM1_FULL_STOP_RETENTION : full SRAM1 retention.
+ * @arg PWR_SRAM2_FULL_STOP_RETENTION : full SRAM2 retention.
+ * @arg PWR_ICACHE_FULL_STOP_RETENTION : I-CACHE SRAM retention.
* @retval None.
*/
void HAL_PWREx_EnableRAMsContentStopRetention(uint32_t RAMSelection)
@@ -552,9 +552,9 @@ void HAL_PWREx_EnableRAMsContentStopRetention(uint32_t RAMSelection)
* powered down in Stop mode. (Consumption is optimized)
* @param RAMSelection: Specifies RAMs content to be lost in Stop mode.
* This parameter can be one or a combination of the values:
- * @arg PWR_SRAM1_FULL_STOP_RETENTION : full SRAM1 retention .
- * @arg PWR_SRAM2_FULL_STOP_RETENTION : full SRAM2 retention.
- * @arg PWR_ICACHE_FULL_STOP_RETENTION : I-CACHE SRAM retention.
+ * @arg PWR_SRAM1_FULL_STOP_RETENTION : full SRAM1 retention.
+ * @arg PWR_SRAM2_FULL_STOP_RETENTION : full SRAM2 retention.
+ * @arg PWR_ICACHE_FULL_STOP_RETENTION : I-CACHE SRAM retention.
* @retval None.
*/
void HAL_PWREx_DisableRAMsContentStopRetention(uint32_t RAMSelection)
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_ramcfg.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_ramcfg.c
index 66d7e8071e..d5cd69e12b 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_ramcfg.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_ramcfg.c
@@ -31,12 +31,12 @@
[..]
(+) Each SRAM is managed by a RAMCFG instance.
(++) SRAM1 placed in Core Domain.
- (+++) Size = 64 kB (STM32WBA54xx, STM32WBA55xx)
+ (+++) Size = 64 kB (STM32WBA54xx, STM32WBA55xx, STM32WBA5Mxx)
(+++) Size = 16 kB (STM32WBA50xx)
(+++) Base Address = 0x20000000.
(++) SRAM2 placed in Core Domain.
- (+++) Size = 64 kB (STM32WBA54xx, STM32WBA55xx)
+ (+++) Size = 64 kB (STM32WBA54xx, STM32WBA55xx, STM32WBA5Mxx)
(+++) Size = 48 kB (STM32WBA50xx)
(+++) Base Address = 0x20010000.
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rcc.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rcc.c
index d9e342f11a..e3de60ef44 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rcc.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rcc.c
@@ -1634,6 +1634,14 @@ uint32_t HAL_RCC_GetResetSource(void)
/**
* @brief Configure the RCC item attribute(s).
* @note Available attributes are to secure items and set RCC as privileged.
+ * @note As the privileged attributes concern either all secure or all
+ * non-secure RCC resources accesses and not each RCC individual items
+ * access attribute, the application must ensure that the privilege
+ * access attribute configurations are coherent amongst the security
+ * level set on RCC individual items so not to overwrite a previous
+ * more restricted access rule (consider either all secure and/or all
+ * non-secure RCC resources accesses by privileged-only transactions or
+ * privileged and unprivileged transactions).
* @param Item Item(s) to set attributes on.
* This parameter can be a one or a combination of @ref RCC_items
* @param Attributes specifies the RCC secure/privilege attributes.
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rng.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rng.c
index cbaa165f72..dd490bc154 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rng.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rng.c
@@ -197,17 +197,18 @@ HAL_StatusTypeDef HAL_RNG_Init(RNG_HandleTypeDef *hrng)
/* Disable RNG */
__HAL_RNG_DISABLE(hrng);
+#if defined(RNG_CR_NIST_VALUE)
+ /* Recommended value for NIST compliance, refer to application note AN4230 */
+ WRITE_REG(hrng->Instance->CR, RNG_CR_NIST_VALUE | RNG_CR_CONDRST | hrng->Init.ClockErrorDetection);
+#else
/* Clock Error Detection Configuration when CONDRT bit is set to 1 */
MODIFY_REG(hrng->Instance->CR, RNG_CR_CED | RNG_CR_CONDRST | RNG_CR_RNG_CONFIG2,
hrng->Init.ClockErrorDetection | RNG_CR_CONDRST | (1U << RNG_CR_RNG_CONFIG2_Pos));
-#if defined(RNG_CR_NIST_VALUE)
- /* Recommended value for NIST compliance, refer to application note AN4230 */
- WRITE_REG(hrng->Instance->CR, RNG_CR_NIST_VALUE);
-#endif /* defined(RNG_CR_NIST_VALUE) */
+#endif /* RNG_CR_NIST_VALUE */
#if defined(RNG_HTCR_NIST_VALUE)
/* Recommended value for NIST compliance, refer to application note AN4230 */
WRITE_REG(hrng->Instance->HTCR, RNG_HTCR_NIST_VALUE);
-#endif /* defined(RNG_HTCR_NIST_VALUE) */
+#endif /* RNG_HTCR_NIST_VALUE */
/* Writing bit CONDRST=0 */
CLEAR_BIT(hrng->Instance->CR, RNG_CR_CONDRST);
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_uart.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_uart.c
index ce8899a170..17ee716eec 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_uart.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_uart.c
@@ -3949,7 +3949,6 @@ static void UART_DMAAbortOnError(DMA_HandleTypeDef *hdma)
{
UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent);
huart->RxXferCount = 0U;
- huart->TxXferCount = 0U;
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered error callback*/
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_comp.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_comp.c
index 45afaeb9bf..bde489b511 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_comp.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_comp.c
@@ -88,14 +88,14 @@
#define IS_LL_COMP_OUTPUT_BLANKING_SOURCE(__COMP_INSTANCE__, __OUTPUT_BLANKING_SOURCE__) \
((((__COMP_INSTANCE__) == COMP1) && \
- (((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_NONE) || \
- ((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1) || \
- ((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1) || \
- ((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1))) \
+ (((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_NONE) || \
+ ((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1) || \
+ ((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1) || \
+ ((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1))) \
|| \
(((__COMP_INSTANCE__) == COMP2) && \
- (((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_NONE) || \
- ((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_TIM3_OC4_COMP2))) \
+ (((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_NONE) || \
+ ((__OUTPUT_BLANKING_SOURCE__) == LL_COMP_BLANKINGSRC_TIM3_OC4_COMP2))) \
)
/**
* @}
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_dma.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_dma.c
index 1f13c6cdcd..52dbc539f1 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_dma.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_dma.c
@@ -52,7 +52,6 @@
*/
#if defined (GPDMA1)
-
/** @addtogroup DMA_LL
* @{
*/
@@ -137,12 +136,14 @@
#define IS_LL_DMA_TRIGGER_SELECTION(__VALUE__) ((__VALUE__) <= LL_GPDMA1_TRIGGER_ADC4_AWD1)
#endif /* TIM3 */
+
#if defined (LPTIM2)
#define IS_LL_DMA_REQUEST_SELECTION(__VALUE__) ((__VALUE__) <= LL_GPDMA1_REQUEST_LPTIM2_UE)
#else
#define IS_LL_DMA_REQUEST_SELECTION(__VALUE__) ((__VALUE__) <= LL_GPDMA1_REQUEST_LPTIM1_UE)
#endif /* LPTIM2 */
+
#define IS_LL_DMA_TRANSFER_EVENT_MODE(__VALUE__) (((__VALUE__) == LL_DMA_TCEM_BLK_TRANSFER) || \
((__VALUE__) == LL_DMA_TCEM_RPT_BLK_TRANSFER) || \
((__VALUE__) == LL_DMA_TCEM_EACH_LLITEM_TRANSFER) || \
@@ -191,7 +192,8 @@
#define IS_LL_DMA_LINK_UPDATE_REGISTERS(__VALUE__) ((((__VALUE__) & 0x01FE0000U) == 0U) && ((__VALUE__) != 0U))
-#define IS_LL_DMA_LINK_NODETYPE(__VALUE__) ((__VALUE__) == LL_DMA_GPDMA_LINEAR_NODE)
+#define IS_LL_DMA_LINK_NODETYPE(TYPE) \
+ ((TYPE) == LL_DMA_GPDMA_LINEAR_NODE)
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
#define IS_LL_DMA_CHANNEL_SRC_SEC(__VALUE__) (((__VALUE__) == LL_DMA_CHANNEL_SRC_NSEC) || \
@@ -424,7 +426,6 @@ uint32_t LL_DMA_Init(DMA_TypeDef *DMAx, uint32_t Channel, LL_DMA_InitTypeDef *DM
LL_DMA_ConfigBurstLength(DMAx, Channel, DMA_InitStruct->SrcBurstLength,
DMA_InitStruct->DestBurstLength);
}
-
/*-------------------------- DMAx CTR2 Configuration -------------------------
* Configure the channel transfer parameter :
* - TransferEventMode: DMA_CTR2_TCEM [31:30] bits
@@ -603,7 +604,6 @@ uint32_t LL_DMA_List_Init(DMA_TypeDef *DMAx, uint32_t Channel, LL_DMA_InitLinked
LL_DMA_ConfigControl(DMAx, Channel, DMA_InitLinkedListStruct->Priority | \
DMA_InitLinkedListStruct->LinkAllocatedPort | \
DMA_InitLinkedListStruct->LinkStepMode);
-
/*-------------------------- DMAx CTR2 Configuration -------------------------
* Configure the channel transfer parameter :
* - TransferEventMode: DMA_CTR2_TCEM [31:30] bits
@@ -666,7 +666,7 @@ void LL_DMA_NodeStructInit(LL_DMA_InitNodeTypeDef *DMA_InitNodeStruct)
* LL_DMA_LinkNodeTypeDef parameters.
* @retval None
*/
-uint32_t LL_DMA_CreateLinkNode(LL_DMA_InitNodeTypeDef *DMA_InitNodeStruct, LL_DMA_LinkNodeTypeDef *pNode)
+uint32_t LL_DMA_CreateLinkNode(const LL_DMA_InitNodeTypeDef *DMA_InitNodeStruct, LL_DMA_LinkNodeTypeDef *pNode)
{
uint32_t reg_counter = 0U;
@@ -746,6 +746,7 @@ uint32_t LL_DMA_CreateLinkNode(LL_DMA_InitNodeTypeDef *DMA_InitNodeStruct, LL_DM
DMA_InitNodeStruct->SrcSecure);
#endif /* (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
+
/* Update CTR1 register fields */
pNode->LinkRegisters[reg_counter] |= (DMA_InitNodeStruct->DestAllocatedPort | \
DMA_InitNodeStruct->DestHWordExchange | \
@@ -836,7 +837,6 @@ uint32_t LL_DMA_CreateLinkNode(LL_DMA_InitNodeTypeDef *DMA_InitNodeStruct, LL_DM
}
-
/* Check if CLLR register update is enabled */
if ((DMA_InitNodeStruct->UpdateRegisters & LL_DMA_UPDATE_CLLR) == LL_DMA_UPDATE_CLLR)
{
@@ -854,6 +854,11 @@ uint32_t LL_DMA_CreateLinkNode(LL_DMA_InitNodeTypeDef *DMA_InitNodeStruct, LL_DM
DMA_CLLR_UDA | DMA_CLLR_ULL)));
}
+ else
+ {
+ /* Reset of the CLLR of the node being created */
+ pNode->LinkRegisters[reg_counter] = 0U;
+ }
return (uint32_t)SUCCESS;
}
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_gpio.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_gpio.c
index 8661f1a656..baa3a7bccd 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_gpio.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_gpio.c
@@ -30,7 +30,7 @@
* @{
*/
-#if defined (GPIOA) || defined (GPIOB) || defined (GPIOC) || defined (GPIOH)
+#if defined (GPIOA) || defined (GPIOB) || defined (GPIOC) || defined (GPIOH)
/** @addtogroup GPIO_LL
* @{
diff --git a/system/Drivers/STM32YYxx_HAL_Driver_version.md b/system/Drivers/STM32YYxx_HAL_Driver_version.md
index a81cc7785e..0f8b0e5a07 100644
--- a/system/Drivers/STM32YYxx_HAL_Driver_version.md
+++ b/system/Drivers/STM32YYxx_HAL_Driver_version.md
@@ -19,7 +19,7 @@
* STM32U0: 1.2.0
* STM32U5: 1.6.0
* STM32WB: 1.14.3
- * STM32WBA: 1.4.0
+ * STM32WBA: 1.5.0
* STM32WL: 1.3.0
Release notes of each STM32YYxx HAL Drivers available here:
diff --git a/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h b/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h
index 75d96c6a62..9ca346f966 100644
--- a/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h
+++ b/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h
@@ -101,7 +101,9 @@ extern "C" {
*/
#if !defined (LSI_VALUE)
#define LSI_VALUE 32000UL /*!< LSI Typical Value in Hz*/
-#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz. The real value may vary depending on the variations in voltage and temperature.*/
+#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
+ The real value may vary depending on the variations in voltage
+ and temperature.*/
#if defined (RCC_LSI2_SUPPORT)
#if !defined (LSI2_VALUE)
@@ -172,8 +174,8 @@ extern "C" {
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
-#define USE_HAL_IWDG_REGISTER_CALLBACKS 0U /* IWDG register callback disabled */
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
+#define USE_HAL_IWDG_REGISTER_CALLBACKS 0U /* IWDG register callback disabled */
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */
#define USE_HAL_PKA_REGISTER_CALLBACKS 0U /* PKA register callback disabled */
#define USE_HAL_RAMCFG_REGISTER_CALLBACKS 0U /* RAMCFG register callback disabled */
@@ -205,12 +207,10 @@ extern "C" {
#define USE_HAL_HASH_SUSPEND_RESUME 0U
-
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include module's header file
*/
-
#ifdef HAL_DMA_MODULE_ENABLED
#include "stm32wbaxx_hal_dma.h"
#endif /* HAL_DMA_MODULE_ENABLED */
diff --git a/variants/STM32WBAxx/WBA5MJGH/boards_entry.txt b/variants/STM32WBAxx/WBA5MJGH/boards_entry.txt
index 638de3441c..30c96f2714 100644
--- a/variants/STM32WBAxx/WBA5MJGH/boards_entry.txt
+++ b/variants/STM32WBAxx/WBA5MJGH/boards_entry.txt
@@ -8,7 +8,7 @@ GenWBA.menu.pnum.GENERIC_WBA5MJGHX=Generic WBA5MJGHx
GenWBA.menu.pnum.GENERIC_WBA5MJGHX.upload.maximum_size=1048576
GenWBA.menu.pnum.GENERIC_WBA5MJGHX.upload.maximum_data_size=131072
GenWBA.menu.pnum.GENERIC_WBA5MJGHX.build.board=GENERIC_WBA5MJGHX
-GenWBA.menu.pnum.GENERIC_WBA5MJGHX.build.product_line=
+GenWBA.menu.pnum.GENERIC_WBA5MJGHX.build.product_line=STM32WBA5Mxx
GenWBA.menu.pnum.GENERIC_WBA5MJGHX.build.variant=STM32WBAxx/WBA5MJGH
GenWBA.menu.pnum.GENERIC_WBA5MJGHX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32WBAxx/STM32WBA55.svd
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy