Contents
Release of CMSIS devices drivers supporting
STM32WBA5x and STM32WBA6x devices
+
Update CMSIS devices drivers to include latest corrections
+
+
Update DMA request field to cover all possible requests
+
For WBA50, map only heap and stack in SRAM1, remaining data in
+SRAM2
+
+
+
+
+
Known Limitations
+
+
None
+
+
Dependencies
+
+
None
+
+
Notes
+
+
None
+
+
+
+
+
+
+
+
Main Changes
+
Official
+Release of STM32CubeWBA Firmware package supporting
+STM32WBA5x and STM32WBA6x devices
+
Contents
+
Official
+Release of CMSIS devices drivers supporting
+STM32WBA5x and STM32WBA6x devices
+
Update CMSIS devices drivers to add STM32WBA6M
Update CMSIS devices drivers to include latest corrections
@@ -95,15 +134,15 @@
Contents
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -114,14 +153,14 @@
Notes
-
Main Changes
+
Main Changes
Official
+id="official-release-of-stm32cubewba-firmware-package-supporting-stm32wba5x-and-stm32wba6x-devices-2">Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA5x and STM32WBA6x devices
-
Contents
+
Contents
Official
+id="official-release-of-cmsis-devices-drivers-supporting-stm32wba5x-and-stm32wba6x-devices-2">Official
Release of CMSIS devices drivers supporting
STM32WBA5x and STM32WBA6x devices
@@ -134,15 +173,15 @@
Contents
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -153,14 +192,14 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA50xx, STM32WBA52xx,
STM32WBA54xx, STM32WBA55xx and
STM32WBA5Mxx devices
-
Contents
+
Contents
Official
Release of CMSIS devices drivers supporting
@@ -180,15 +219,15 @@
Contents
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -199,14 +238,14 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA50xx, STM32WBA52xx,
STM32WBA54xx and STM32WBA55xx
devices
-
Contents
+
Contents
Official
Release of CMSIS devices drivers supporting
@@ -224,15 +263,15 @@
Contents
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -243,13 +282,13 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA52xx and STM32WBA55xx
devices
-
Contents
+
Contents
Official
Release of CMSIS devices drivers supporting
@@ -267,15 +306,15 @@
Contents
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -286,13 +325,13 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA52xx and STM32WBA55xx
devices
-
Contents
+
Contents
Official
Release of CMSIS devices drivers supporting
@@ -312,15 +351,15 @@
Contents
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -331,12 +370,12 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA52xx devices
-
Contents
+
Contents
Official
Release of CMSIS devices drivers supporting
@@ -349,15 +388,15 @@
Contents
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -368,27 +407,27 @@
Notes
-
Main Changes
+
Main Changes
First
Official Release of STM32CubeWBA Firmware package
supporting STM32WBA52xx devices
Update HAL/LL drivers to support of STM32WBA6Mxx
devices
-
HAL Drivers updates
+
HAL Drivers updates
HAL CORTEX driver
@@ -186,7 +284,7 @@
HAL Drivers updates
-
LL Drivers updates
+
LL Drivers updates
LL ADC driver
@@ -224,7 +322,8 @@
LL Drivers updates
-
Supported Devices and boards
+
Supported Devices and
+boards
STM32WBA50xx, STM32WBA52xx, STM32WBA54xx, STM32WBA55xx and
STM32WBA5Mxx devices
@@ -233,19 +332,19 @@
Supported Devices and boards
NUCLEO-WBA55CG, STM32WBA55G-DK1 and B-WBA5M-WPAN boards
NUCLEO-WBA65RI and STM32WBA65I-DK1 board
-
Backward compatibility
+
Backward compatibility
Not applicable
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -256,14 +355,14 @@
Notes
-
Main Changes
+
Main Changes
Official
+id="official-release-of-stm32cubewba-firmware-package-supporting-stm32wba5x-and-stm32wba6x-devices-2">Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA5x and STM32WBA6x devices
-
Contents
+
Contents
Official
+id="official-release-of-halll-drivers-for-stm32wbaxx-serie-2">Official
Release of HAL/LL Drivers for
STM32WBAxx serie
@@ -281,7 +380,7 @@
Contents
-
HAL Drivers updates
+
HAL Drivers updates
HAL CRYP driver
@@ -304,13 +403,13 @@
HAL Drivers updates
-
LL Drivers updates
+
LL Drivers updates
None
-
Supported Devices and
+
Supported Devices and
boards
STM32WBA50xx, STM32WBA52xx, STM32WBA54xx, STM32WBA55xx and
@@ -320,19 +419,19 @@
Supported Devices and
NUCLEO-WBA55CG, STM32WBA55G-DK1 and B-WBA5M-WPAN boards
NUCLEO-WBA65RI and STM32WBA65I-DK1 board
-
Backward compatibility
+
Backward compatibility
Not applicable
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -343,14 +442,14 @@
Notes
-
Main Changes
+
Main Changes
Official
+id="official-release-of-stm32cubewba-firmware-package-supporting-stm32wba5x-and-stm32wba6x-devices-3">Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA5x and STM32WBA6x devices
-
Contents
+
Contents
Official
+id="official-release-of-halll-drivers-for-stm32wbaxx-serie-3">Official
Release of HAL/LL Drivers for
STM32WBAxx serie
@@ -369,7 +468,7 @@
Contents
-
HAL Drivers updates
+
HAL Drivers updates
HAL ADC driver
@@ -398,7 +497,7 @@
HAL Drivers updates
-
LL Drivers updates
+
LL Drivers updates
LL LPTIM driver
@@ -408,7 +507,7 @@
LL Drivers updates
-
Supported Devices and
+
Supported Devices and
boards
STM32WBA50xx, STM32WBA52xx, STM32WBA54xx, STM32WBA55xx and
@@ -418,19 +517,19 @@
Supported Devices and
NUCLEO-WBA55CG, STM32WBA55G-DK1 and B-WBA5M-WPAN boards
NUCLEO-WBA65RI and STM32WBA65I-DK1 board
-
Backward compatibility
+
Backward compatibility
Not applicable
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -441,16 +540,16 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA50xx, STM32WBA52xx,
STM32WBA54xx, STM32WBA55xx and
STM32WBA5Mxx devices
-
Contents
+
Contents
Official
+id="official-release-of-halll-drivers-for-stm32wbaxx-serie-4">Official
Release of HAL/LL Drivers for
STM32WBAxx serie
@@ -468,7 +567,7 @@
Contents
-
HAL Drivers updates
+
HAL Drivers updates
HAL COMP driver
@@ -541,7 +640,7 @@
HAL Drivers updates
-
LL Drivers updates
+
LL Drivers updates
LL ADC driver
@@ -574,26 +673,26 @@
LL Drivers updates
-
Supported Devices and
+
Supported Devices and
boards
STM32WBA50xx, STM32WBA52xx, STM32WBA54xx, STM32WBA55xx and
STM32WBA5Mxx devices
NUCLEO-WBA55CG, STM32WBA55G-DK1 and b-WBA5M-WPAN boards
-
Backward compatibility
+
Backward compatibility
Not applicable
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -604,16 +703,16 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA50xx, STM32WBA52xx,
STM32WBA54xx and STM32WBA55xx
devices
-
Contents
+
Contents
Official
+id="official-release-of-halll-drivers-for-stm32wbaxx-serie-5">Official
Release of HAL/LL Drivers for
STM32WBAxx serie
@@ -630,7 +729,7 @@
Contents
-
HAL Drivers updates
+
HAL Drivers updates
HAL CORTEX driver
@@ -675,7 +774,7 @@
HAL Drivers updates
-
LL Drivers updates
+
LL Drivers updates
LL CORTEX driver
@@ -705,26 +804,26 @@
LL Drivers updates
-
Supported Devices and
+
Supported Devices and
boards
STM32WBA50xx, STM32WBA52xx, STM32WBA54xx and STM32WBA55xx
devices
NUCLEO-WBA52CG, NUCLEO-WBA55CG and STM32WBA55G-DK1 boards
-
Backward compatibility
+
Backward compatibility
Not applicable
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -735,15 +834,15 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA52xx and STM32WBA55xx
devices
-
Contents
+
Contents
Official
+id="official-release-of-halll-drivers-for-stm32wbaxx-serie-6">Official
Release of HAL/LL Drivers for
STM32WBAxx serie
@@ -760,7 +859,7 @@
Contents
-
HAL Drivers updates
+
HAL Drivers updates
HAL CORTEX driver
@@ -798,7 +897,7 @@
HAL Drivers updates
-
LL Drivers updates
+
LL Drivers updates
LL LPUART driver
@@ -807,25 +906,25 @@
LL Drivers updates
-
Supported Devices and
+
Supported Devices and
boards
STM32WBA52xx and STM32WBA55xx devices
NUCLEO-WBA52CG, NUCLEO-WBA55CG and STM32WBA55G-DK1 boards
-
Backward compatibility
+
Backward compatibility
Not applicable
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -836,15 +935,15 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA52xx and STM32WBA55xx
devices
-
Contents
+
Contents
Official
+id="official-release-of-halll-drivers-for-stm32wbaxx-serie-7">Official
Release of HAL/LL Drivers for
STM32WBAxx serie
@@ -871,7 +970,7 @@
Contents
-
HAL Drivers updates
+
HAL Drivers updates
HAL CORTEX driver
@@ -984,7 +1083,7 @@
HAL Drivers updates
-
LL Drivers updates
+
LL Drivers updates
LL GPIO driver
@@ -1011,25 +1110,25 @@
LL Drivers updates
-
Supported Devices and
+
Supported Devices and
boards
STM32WBA52xx and STM32WBA55xx devices
NUCLEO-WBA52CG, NUCLEO-WBA55CG and STM32WBA55G-DK1 boards
-
Backward compatibility
+
Backward compatibility
Not applicable
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -1040,14 +1139,14 @@
Notes
-
Main Changes
+
Main Changes
Official
Release of STM32CubeWBA Firmware package supporting
STM32WBA52xx devices
-
Contents
+
Contents
Official
+id="official-release-of-halll-drivers-for-stm32wbaxx-serie-8">Official
Release of HAL/LL Drivers for
STM32WBAxx serie
@@ -1063,7 +1162,7 @@
Contents
-
HAL Drivers updates
+
HAL Drivers updates
HAL CORTEX driver
@@ -1141,7 +1240,7 @@
HAL Drivers updates
-
LL Drivers updates
+
LL Drivers updates
LL DMA driver
@@ -1167,25 +1266,25 @@
LL Drivers updates
-
Supported Devices and
+
Supported Devices and
boards
STM32WBA52xx devices
NUCLEO-WBA52CG board
-
Backward compatibility
+
Backward compatibility
Not applicable
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
@@ -1196,12 +1295,12 @@
Notes
-
Main Changes
+
Main Changes
First
Official Release of STM32CubeWBA Firmware package
supporting STM32WBA52xx devices
-
Contents
+
Contents
First
Official Release of HAL/LL Drivers for
@@ -1219,25 +1318,25 @@
Contents
-
Supported Devices and
+
Supported Devices and
boards
STM32WBA52xx devices
NUCLEO-WBA52CG board
-
Backward compatibility
+
Backward compatibility
Not applicable
-
Known Limitations
+
Known Limitations
None
-
Dependencies
+
Dependencies
None
-
Notes
+
Notes
None
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_hash.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_hash.c
index 8ee08b2aeb..05eafdb6d5 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_hash.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_hash.c
@@ -301,7 +301,7 @@ HAL_StatusTypeDef HAL_HASH_DeInit(HASH_HandleTypeDef *hhash)
* the configuration information for HASH module
* @retval HAL status
*/
-HAL_StatusTypeDef HAL_HASH_SetConfig(HASH_HandleTypeDef *hhash, HASH_ConfigTypeDef *pConf)
+HAL_StatusTypeDef HAL_HASH_SetConfig(HASH_HandleTypeDef *hhash, const HASH_ConfigTypeDef *pConf)
{
uint32_t cr_value;
@@ -751,11 +751,11 @@ HAL_StatusTypeDef HAL_HASH_ProcessSuspend(HASH_HandleTypeDef *hhash)
/* DMA3 used, DMA_CBR1_BNDT in bytes, DMA_CSR_FIFOL in words */
remainingwords = ((((DMA_Channel_TypeDef *)hhash->hdmain->Instance)->CBR1) \
& DMA_CBR1_BNDT) / 4U;
-#if defined(GPDMA1)
+#if defined(DMA_CSR_FIFOL)
remainingwords += ((((DMA_Channel_TypeDef *)hhash->hdmain->Instance)->CSR) \
& DMA_CSR_FIFOL) >> DMA_CSR_FIFOL_Pos;
-#endif /* GPDMA1 */
+#endif /* DMA_CSR_FIFOL */
if (remainingwords <= nbbytePartialHash)
{
/* No suspension attempted since almost to the end of the transferred data. */
@@ -1837,11 +1837,10 @@ HAL_StatusTypeDef HAL_HASH_HMAC_Start_IT(HASH_HandleTypeDef *hhash, const uint8_
{
return HAL_BUSY;
}
-
+ status = HASH_WriteData_IT(hhash);
/* Enable the specified HASH interrupt*/
__HAL_HASH_ENABLE_IT(hhash, HASH_IT_DINI | HASH_IT_DCI);
- status = HASH_WriteData_IT(hhash);
/* Return function status */
return status;
@@ -1909,10 +1908,10 @@ HAL_StatusTypeDef HAL_HASH_HMAC_Accumulate_IT(HASH_HandleTypeDef *hhash, const u
/* Set the phase */
hhash->Phase = HAL_HASH_PHASE_PROCESS;
}
+ status = HASH_WriteData_IT(hhash);
/* Enable the specified HASH interrupt*/
__HAL_HASH_ENABLE_IT(hhash, HASH_IT_DINI | HASH_IT_DCI);
- status = HASH_WriteData_IT(hhash);
}
else
{
@@ -1959,10 +1958,10 @@ HAL_StatusTypeDef HAL_HASH_HMAC_AccumulateLast_IT(HASH_HandleTypeDef *hhash, con
hhash->Size = Size;
/* Set multi buffers accumulation flag */
hhash->Accumulation = 0U;
+ status = HASH_WriteData_IT(hhash);
/* Enable the specified HASH interrupt*/
__HAL_HASH_ENABLE_IT(hhash, HASH_IT_DINI | HASH_IT_DCI);
- status = HASH_WriteData_IT(hhash);
}
else
{
@@ -2203,7 +2202,7 @@ void HAL_HASH_IRQHandler(HASH_HandleTypeDef *hhash)
}
/* If Peripheral ready to accept new data */
- if ((itflag & HASH_FLAG_DINIS) == HASH_FLAG_DINIS)
+ if (((itflag & HASH_FLAG_DINIS) == HASH_FLAG_DINIS) && ((itflag & HASH_FLAG_DCIS) != HASH_FLAG_DCIS))
{
if ((itsource & HASH_IT_DINI) == HASH_IT_DINI)
{
@@ -2909,7 +2908,7 @@ static HAL_StatusTypeDef HASH_WriteData_IT(HASH_HandleTypeDef *hhash)
}
}
}
- else if ((hhash->State == HAL_HASH_STATE_SUSPENDED))
+ else if (hhash->State == HAL_HASH_STATE_SUSPENDED)
{
return HAL_OK;
}
@@ -3015,43 +3014,20 @@ static HAL_StatusTypeDef HASH_WaitOnFlagUntilTimeout(HASH_HandleTypeDef *hhash,
{
uint32_t tickstart = HAL_GetTick();
- /* Wait until flag is set */
- if (Status == RESET)
- {
- while (__HAL_HASH_GET_FLAG(hhash, Flag) == RESET)
- {
- /* Check for the Timeout */
- if (Timeout != HAL_MAX_DELAY)
- {
- if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U))
- {
- /* Set State to Ready to be able to restart later on */
- hhash->State = HAL_HASH_STATE_READY;
- hhash->ErrorCode |= HAL_HASH_ERROR_TIMEOUT;
- /* Process Unlocked */
- __HAL_UNLOCK(hhash);
- return HAL_ERROR;
- }
- }
- }
- }
- else
+ while (__HAL_HASH_GET_FLAG(hhash, Flag) == Status)
{
- while (__HAL_HASH_GET_FLAG(hhash, Flag) != RESET)
+ /* Check for the Timeout */
+ if (Timeout != HAL_MAX_DELAY)
{
- /* Check for the Timeout */
- if (Timeout != HAL_MAX_DELAY)
+ if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U))
{
- if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U))
- {
- /* Set State to Ready to be able to restart later on */
- hhash->State = HAL_HASH_STATE_READY;
- hhash->ErrorCode |= HAL_HASH_ERROR_TIMEOUT;
- /* Process Unlocked */
- __HAL_UNLOCK(hhash);
+ /* Set State to Ready to be able to restart later on */
+ hhash->State = HAL_HASH_STATE_READY;
+ hhash->ErrorCode |= HAL_HASH_ERROR_TIMEOUT;
+ /* Process Unlocked */
+ __HAL_UNLOCK(hhash);
- return HAL_ERROR;
- }
+ return HAL_ERROR;
}
}
}
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_hcd.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_hcd.c
index 9528b4cbf9..306d23f0bb 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_hcd.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_hcd.c
@@ -1777,8 +1777,7 @@ static void HCD_HC_OUT_IRQHandler(HCD_HandleTypeDef *hhcd, uint8_t chnum)
hhcd->hc[chnum].state = HC_HALTED;
hhcd->hc[chnum].urb_state = URB_DONE;
- if ((hhcd->hc[chnum].ep_type == EP_TYPE_BULK) ||
- (hhcd->hc[chnum].ep_type == EP_TYPE_INTR))
+ if (hhcd->hc[chnum].ep_type != EP_TYPE_ISOC)
{
if (hhcd->Init.dma_enable == 0U)
{
@@ -2284,7 +2283,7 @@ HAL_StatusTypeDef HAL_HCD_HC_Init(HCD_HandleTypeDef *hhcd, uint8_t ch_num,
else
{
/* This is a dual EP0 PMA allocation */
- hhcd->ep0_PmaAllocState |= (0x1U << 12);
+ hhcd->ep0_PmaAllocState |= (0x1UL << 12);
/* PMA Dynamic Allocation for EP0 OUT direction */
hhcd->hc[ch_num & 0xFU].ch_dir = CH_OUT_DIR;
@@ -4520,7 +4519,7 @@ static uint16_t HAL_HCD_GetFreePMA(HCD_HandleTypeDef *hhcd, uint16_t mps)
while ((j <= 31U) && (FreeBlocks != NbrReqBlocks))
{
/* check if block j is free */
- if ((Entry & ((uint32_t)1U << j)) == 0U)
+ if ((Entry & ((uint32_t)1UL << j)) == 0U)
{
if (FreeBlocks == 0U)
{
@@ -4531,7 +4530,7 @@ static uint16_t HAL_HCD_GetFreePMA(HCD_HandleTypeDef *hhcd, uint16_t mps)
j++;
/* Parse Column PMALockTable */
- while ((j <= 31U) && ((Entry & ((uint32_t)1U << j)) == 0U) && (FreeBlocks < NbrReqBlocks))
+ while ((j <= 31U) && ((Entry & ((uint32_t)1UL << j)) == 0U) && (FreeBlocks < NbrReqBlocks))
{
FreeBlocks++;
j++;
@@ -4539,7 +4538,7 @@ static uint16_t HAL_HCD_GetFreePMA(HCD_HandleTypeDef *hhcd, uint16_t mps)
/* Free contiguous Blocks not found */
if (((FreeBlocks < NbrReqBlocks) && (j < 31U)) ||
- ((j == 31U) && ((Entry & ((uint32_t)1U << j)) != 0U)))
+ ((j == 31U) && ((Entry & ((uint32_t)1UL << j)) != 0U)))
{
FreeBlocks = 0U;
}
@@ -4557,7 +4556,7 @@ static uint16_t HAL_HCD_GetFreePMA(HCD_HandleTypeDef *hhcd, uint16_t mps)
{
for (uint8_t j = ColIndex; j <= 31U; j++)
{
- hhcd->PMALookupTable[i] |= ((uint32_t)1U << j);
+ hhcd->PMALookupTable[i] |= ((uint32_t)1UL << j);
if (--FreeBlocks == 0U)
{
break;
@@ -4616,7 +4615,7 @@ HAL_StatusTypeDef HAL_HCD_PMAlloc(HCD_HandleTypeDef *hhcd, uint8_t ch_num,
{
hhcd->ep0_PmaAllocState &= 0xFFF0U;
hhcd->ep0_PmaAllocState |= ch_num;
- hhcd->ep0_PmaAllocState |= (1U << 8);
+ hhcd->ep0_PmaAllocState |= (1UL << 8);
}
/* Configure the PMA */
@@ -4749,7 +4748,7 @@ HAL_StatusTypeDef HAL_HCD_PMAReset(HCD_HandleTypeDef *hhcd)
/* Allocate a Space for buffer descriptor table depending on the Host channel number */
for (uint8_t i = 0U; i < hhcd->Init.Host_channels; i++)
{
- hhcd->PMALookupTable[0] |= ((uint32_t)1U << i);
+ hhcd->PMALookupTable[0] |= ((uint32_t)1UL << i);
}
return HAL_OK;
@@ -4811,12 +4810,12 @@ static HAL_StatusTypeDef HAL_HCD_PMAFree(HCD_HandleTypeDef *hhcd, uint32_t pma_
for (uint8_t j = ColIndex; j <= 31U; j++)
{
/* Check if the block is not already reserved or it was already closed */
- if ((hhcd->PMALookupTable[i] & ((uint32_t)1U << j)) == 0U)
+ if ((hhcd->PMALookupTable[i] & ((uint32_t)1UL << j)) == 0U)
{
return HAL_ERROR;
}
/* Free the reserved block by resetting the corresponding bit */
- hhcd->PMALookupTable[i] &= ~(1U << j);
+ hhcd->PMALookupTable[i] &= ~(1UL << j);
if (--block_nbr == 0U)
{
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pcd.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pcd.c
index 2e169f908d..209990fe9e 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pcd.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_pcd.c
@@ -1451,7 +1451,7 @@ void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd)
if ((hpcd->OUT_ep[epnum].type == EP_TYPE_ISOC) &&
((RegVal & USB_OTG_DOEPCTL_EPENA) == USB_OTG_DOEPCTL_EPENA) &&
- (((RegVal & (0x1U << 16)) >> 16U) == (hpcd->FrameNumber & 0x1U)))
+ (((RegVal & (0x1UL << 16)) >> 16U) == (hpcd->FrameNumber & 0x1U)))
{
hpcd->OUT_ep[epnum].is_iso_incomplete = 1U;
@@ -2241,7 +2241,7 @@ HAL_StatusTypeDef HAL_PCD_SetTestMode(const PCD_HandleTypeDef *hpcd, uint8_t tes
case TEST_SE0_NAK:
case TEST_PACKET:
case TEST_FORCE_EN:
- USBx_DEVICE->DCTL &= ~(0x7U << 4);
+ USBx_DEVICE->DCTL &= ~(0x7UL << 4);
USBx_DEVICE->DCTL |= (uint32_t)testmode << 4;
break;
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 92bc2f411e..2c77a89f3f 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
@@ -409,7 +409,7 @@ void HAL_PWREx_DisableFastSoftStart(void)
}
#if defined(PWR_STOP2_SUPPORT)
-#if defined(USB_OTG_HS)
+#if defined(PWR_VOSR_USBPWREN)
/**
* @brief Configure the clocked delay between VDD11USBDIS and VDD11USBRDY.
* @param Delay : Specifies the delay in system clock cycles.
@@ -520,7 +520,9 @@ void HAL_PWREx_DisableUSBPWR(void)
{
CLEAR_BIT(PWR->VOSR, PWR_VOSR_USBPWREN);
}
+#endif /* defined(PWR_VOSR_USBPWREN) */
+#if defined(PWR_SVMCR_USV)
/**
* @brief Enable VDDUSB supply.
* @note Remove VDDUSB electrical and logical isolation, once VDDUSB supply
@@ -540,7 +542,7 @@ void HAL_PWREx_DisableVddUSB(void)
{
CLEAR_BIT(PWR->SVMCR, PWR_SVMCR_USV);
}
-#endif /* defined(USB_OTG_HS) */
+#endif /* defined(PWR_SVMCR_USV) */
#if defined(PWR_SVMCR_IO2SV)
/**
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 5c186f8fd1..dd3944dd89 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_ramcfg.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_ramcfg.c
@@ -676,7 +676,7 @@ HAL_StatusTypeDef HAL_RAMCFG_EnableWriteProtection(RAMCFG_HandleTypeDef *hramcfg
/* Check the parameters */
assert_param(IS_RAMCFG_WP_INSTANCE(hramcfg->Instance));
- assert_param(IS_RAMCFG_WRITEPROTECTION_PAGE(StartPage + NbPage));
+ assert_param(IS_RAMCFG_WRITEPROTECTION_PAGE(StartPage + NbPage - 1U));
/* Check RAMCFG state */
if (hramcfg->State == HAL_RAMCFG_STATE_READY)
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rtc_ex.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rtc_ex.c
index 7801b24235..ff2a51f743 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rtc_ex.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_rtc_ex.c
@@ -2648,7 +2648,7 @@ void HAL_RTCEx_BKUPUnblock(const RTC_HandleTypeDef *hrtc)
CLEAR_BIT(TAMP->CR2, TAMP_CR2_BKBLOCK);
}
-#ifdef TAMP_RPCFGR_RPCFG
+#if defined (TAMP_RPCFGR_RPCFG) || defined(TAMP_ERCFGR_ERCFG)
/**
* @brief Enable and Disable the erase of the configurable Device Secrets
* @note This API must be called before enabling the Tamper.
@@ -2670,7 +2670,11 @@ void HAL_RTCEx_ConfigEraseDeviceSecrets(const RTC_HandleTypeDef *hrtc, uint32_t
/* Prevent unused argument(s) compilation warning */
UNUSED(hrtc);
+#if defined (TAMP_RPCFGR_RPCFG)
MODIFY_REG(TAMP->RPCFGR, TAMP_RPCFGR_RPCFG, DeviceSecretConf);
+#elif defined (TAMP_ERCFGR_ERCFG)
+ MODIFY_REG(TAMP->ERCFGR, TAMP_ERCFGR_ERCFG, DeviceSecretConf);
+#endif
}
#endif /* TAMP_RPCFGR_RPCFG */
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 1887f6c60d..9d3d21bb56 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_uart.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_uart.c
@@ -1161,7 +1161,15 @@ HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pD
huart->Instance->TDR = (uint8_t)(*pdata8bits & 0xFFU);
pdata8bits++;
}
- huart->TxXferCount--;
+ if ((huart->gState & HAL_UART_STATE_BUSY_TX) == HAL_UART_STATE_BUSY_TX)
+ {
+ huart->TxXferCount--;
+ }
+ else
+ {
+ /* Process was aborted during the transmission */
+ return HAL_ERROR;
+ }
}
if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TC, RESET, tickstart, Timeout) != HAL_OK)
@@ -1257,7 +1265,15 @@ HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, ui
*pdata8bits = (uint8_t)(huart->Instance->RDR & (uint8_t)uhMask);
pdata8bits++;
}
- huart->RxXferCount--;
+ if (huart->RxState == HAL_UART_STATE_BUSY_RX)
+ {
+ huart->RxXferCount--;
+ }
+ else
+ {
+ /* Process was aborted during the reception */
+ return HAL_ERROR;
+ }
}
/* At end of Rx process, restore huart->RxState to Ready */
@@ -1790,10 +1806,6 @@ HAL_StatusTypeDef HAL_UART_Abort(UART_HandleTypeDef *huart)
}
#endif /* HAL_DMA_MODULE_ENABLED */
- /* Reset Tx and Rx transfer counters */
- huart->TxXferCount = 0U;
- huart->RxXferCount = 0U;
-
/* Clear the Error flags in the ICR register */
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF | UART_CLEAR_NEF | UART_CLEAR_PEF | UART_CLEAR_FEF);
@@ -1862,9 +1874,6 @@ HAL_StatusTypeDef HAL_UART_AbortTransmit(UART_HandleTypeDef *huart)
}
#endif /* HAL_DMA_MODULE_ENABLED */
- /* Reset Tx transfer counter */
- huart->TxXferCount = 0U;
-
/* Flush the whole TX FIFO (if needed) */
if (huart->FifoMode == UART_FIFOMODE_ENABLE)
{
@@ -1929,9 +1938,6 @@ HAL_StatusTypeDef HAL_UART_AbortReceive(UART_HandleTypeDef *huart)
}
#endif /* HAL_DMA_MODULE_ENABLED */
- /* Reset Rx transfer counter */
- huart->RxXferCount = 0U;
-
/* Clear the Error flags in the ICR register */
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF | UART_CLEAR_NEF | UART_CLEAR_PEF | UART_CLEAR_FEF);
@@ -2059,10 +2065,6 @@ HAL_StatusTypeDef HAL_UART_Abort_IT(UART_HandleTypeDef *huart)
/* if no DMA abort complete callback execution is required => call user Abort Complete callback */
if (abortcplt == 1U)
{
- /* Reset Tx and Rx transfer counters */
- huart->TxXferCount = 0U;
- huart->RxXferCount = 0U;
-
/* Clear ISR function pointers */
huart->RxISR = NULL;
huart->TxISR = NULL;
@@ -2143,8 +2145,6 @@ HAL_StatusTypeDef HAL_UART_AbortTransmit_IT(UART_HandleTypeDef *huart)
}
else
{
- /* Reset Tx transfer counter */
- huart->TxXferCount = 0U;
/* Clear TxISR function pointers */
huart->TxISR = NULL;
@@ -2165,9 +2165,6 @@ HAL_StatusTypeDef HAL_UART_AbortTransmit_IT(UART_HandleTypeDef *huart)
else
#endif /* HAL_DMA_MODULE_ENABLED */
{
- /* Reset Tx transfer counter */
- huart->TxXferCount = 0U;
-
/* Clear TxISR function pointers */
huart->TxISR = NULL;
@@ -2242,9 +2239,6 @@ HAL_StatusTypeDef HAL_UART_AbortReceive_IT(UART_HandleTypeDef *huart)
}
else
{
- /* Reset Rx transfer counter */
- huart->RxXferCount = 0U;
-
/* Clear RxISR function pointer */
huart->pRxBuffPtr = NULL;
@@ -2271,9 +2265,6 @@ HAL_StatusTypeDef HAL_UART_AbortReceive_IT(UART_HandleTypeDef *huart)
else
#endif /* HAL_DMA_MODULE_ENABLED */
{
- /* Reset Rx transfer counter */
- huart->RxXferCount = 0U;
-
/* Clear RxISR function pointer */
huart->pRxBuffPtr = NULL;
@@ -3760,8 +3751,6 @@ static void UART_DMATransmitCplt(DMA_HandleTypeDef *hdma)
/* Check if DMA in circular mode */
if (hdma->Mode != DMA_LINKEDLIST_CIRCULAR)
{
- huart->TxXferCount = 0U;
-
/* Disable the DMA transfer for transmit request by resetting the DMAT bit
in the UART CR3 register */
ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAT);
@@ -3812,8 +3801,6 @@ static void UART_DMAReceiveCplt(DMA_HandleTypeDef *hdma)
/* Check if DMA in circular mode */
if (hdma->Mode != DMA_LINKEDLIST_CIRCULAR)
{
- huart->RxXferCount = 0U;
-
/* Disable PE and ERR (Frame error, noise error, overrun error) interrupts */
ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE);
ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
@@ -3840,8 +3827,6 @@ static void UART_DMAReceiveCplt(DMA_HandleTypeDef *hdma)
If Reception till IDLE event has been selected : use Rx Event callback */
if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
{
- huart->RxXferCount = 0;
-
/* Check current nb of data still to be received on DMA side.
DMA Normal mode, remaining nb of data will be 0
DMA Circular mode, remaining nb of data is reset to RxXferSize */
@@ -3937,7 +3922,6 @@ static void UART_DMAError(DMA_HandleTypeDef *hdma)
if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAT)) &&
(gstate == HAL_UART_STATE_BUSY_TX))
{
- huart->TxXferCount = 0U;
UART_EndTxTransfer(huart);
}
@@ -3945,7 +3929,6 @@ static void UART_DMAError(DMA_HandleTypeDef *hdma)
if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) &&
(rxstate == HAL_UART_STATE_BUSY_RX))
{
- huart->RxXferCount = 0U;
UART_EndRxTransfer(huart);
}
@@ -3969,7 +3952,6 @@ static void UART_DMAError(DMA_HandleTypeDef *hdma)
static void UART_DMAAbortOnError(DMA_HandleTypeDef *hdma)
{
UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent);
- huart->RxXferCount = 0U;
#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
/*Call registered error callback*/
@@ -4003,10 +3985,6 @@ static void UART_DMATxAbortCallback(DMA_HandleTypeDef *hdma)
}
}
- /* No Abort process still ongoing : All DMA channels are aborted, call user Abort Complete callback */
- huart->TxXferCount = 0U;
- huart->RxXferCount = 0U;
-
/* Reset errorCode */
huart->ErrorCode = HAL_UART_ERROR_NONE;
@@ -4058,10 +4036,6 @@ static void UART_DMARxAbortCallback(DMA_HandleTypeDef *hdma)
}
}
- /* No Abort process still ongoing : All DMA channels are aborted, call user Abort Complete callback */
- huart->TxXferCount = 0U;
- huart->RxXferCount = 0U;
-
/* Reset errorCode */
huart->ErrorCode = HAL_UART_ERROR_NONE;
@@ -4099,8 +4073,6 @@ static void UART_DMATxOnlyAbortCallback(DMA_HandleTypeDef *hdma)
{
UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent);
- huart->TxXferCount = 0U;
-
/* Flush the whole TX FIFO (if needed) */
if (huart->FifoMode == UART_FIFOMODE_ENABLE)
{
@@ -4132,8 +4104,6 @@ static void UART_DMARxOnlyAbortCallback(DMA_HandleTypeDef *hdma)
{
UART_HandleTypeDef *huart = (UART_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
- huart->RxXferCount = 0U;
-
/* Clear the Error flags in the ICR register */
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF | UART_CLEAR_NEF | UART_CLEAR_PEF | UART_CLEAR_FEF);
diff --git a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_usb.c b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_usb.c
index 47a92d9f97..7a17904212 100644
--- a/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_usb.c
+++ b/system/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_ll_usb.c
@@ -103,7 +103,8 @@ HAL_StatusTypeDef USB_CoreInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef c
if (cfg.dma_enable == 1U)
{
- USBx->GAHBCFG |= USB_OTG_GAHBCFG_HBSTLEN_2;
+ USBx->GAHBCFG &= ~(USB_OTG_GAHBCFG_HBSTLEN);
+ USBx->GAHBCFG |= USB_OTG_GAHBCFG_HBSTLEN_INCR4;
USBx->GAHBCFG |= USB_OTG_GAHBCFG_DMAEN;
}
@@ -734,7 +735,7 @@ HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef
if (ep->xfer_len == 0U)
{
USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_PKTCNT);
- USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (1U << 19));
+ USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (1UL << 19));
USBx_INEP(epnum)->DIEPTSIZ &= ~(USB_OTG_DIEPTSIZ_XFRSIZ);
}
else
@@ -754,7 +755,7 @@ HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef
ep->xfer_len = ep->maxpacket;
}
- USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (1U << 19));
+ USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_PKTCNT & (1UL << 19));
}
else
{
@@ -780,7 +781,7 @@ HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef
if (ep->type == EP_TYPE_ISOC)
{
- if ((USBx_DEVICE->DSTS & (1U << 8)) == 0U)
+ if ((USBx_DEVICE->DSTS & (1UL << 8)) == 0U)
{
USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SODDFRM;
}
@@ -808,7 +809,7 @@ HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef
}
else
{
- if ((USBx_DEVICE->DSTS & (1U << 8)) == 0U)
+ if ((USBx_DEVICE->DSTS & (1UL << 8)) == 0U)
{
USBx_INEP(epnum)->DIEPCTL |= USB_OTG_DIEPCTL_SODDFRM;
}
@@ -841,14 +842,14 @@ HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef
ep->xfer_size = ep->maxpacket;
USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_XFRSIZ & ep->xfer_size);
- USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_PKTCNT & (1U << 19));
+ USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_PKTCNT & (1UL << 19));
}
else
{
if (ep->xfer_len == 0U)
{
USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_XFRSIZ & ep->maxpacket);
- USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_PKTCNT & (1U << 19));
+ USBx_OUTEP(epnum)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_PKTCNT & (1UL << 19));
}
else
{
@@ -870,7 +871,7 @@ HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef
if (ep->type == EP_TYPE_ISOC)
{
- if ((USBx_DEVICE->DSTS & (1U << 8)) == 0U)
+ if ((USBx_DEVICE->DSTS & (1UL << 8)) == 0U)
{
USBx_OUTEP(epnum)->DOEPCTL |= USB_OTG_DOEPCTL_SODDFRM;
}
@@ -896,10 +897,10 @@ HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef
HAL_StatusTypeDef USB_EPStopXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep)
{
__IO uint32_t count = 0U;
+ __IO uint32_t RegVal;
HAL_StatusTypeDef ret = HAL_OK;
uint32_t USBx_BASE = (uint32_t)USBx;
uint32_t dma_enable = (USBx->GAHBCFG & USB_OTG_GAHBCFG_DMAEN) >> 0x5U;
- uint32_t RegVal;
/* IN endpoint */
if (ep->is_in == 1U)
@@ -1393,7 +1394,7 @@ HAL_StatusTypeDef USB_EP0_OutStart(const USB_OTG_GlobalTypeDef *USBx, uint8_t dm
}
USBx_OUTEP(0U)->DOEPTSIZ = 0U;
- USBx_OUTEP(0U)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_PKTCNT & (1U << 19));
+ USBx_OUTEP(0U)->DOEPTSIZ |= (USB_OTG_DOEPTSIZ_PKTCNT & (1UL << 19));
USBx_OUTEP(0U)->DOEPTSIZ |= (3U * 8U);
USBx_OUTEP(0U)->DOEPTSIZ |= USB_OTG_DOEPTSIZ_STUPCNT;
@@ -1525,8 +1526,8 @@ HAL_StatusTypeDef USB_HostInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef c
USBx->GINTSTS = CLEAR_INTERRUPT_MASK;
/* set Rx FIFO size */
USBx->GRXFSIZ = 0x200U;
- USBx->DIEPTXF0_HNPTXFSIZ = (uint32_t)(((0x100U << 16) & USB_OTG_NPTXFD) | 0x200U);
- USBx->HPTXFSIZ = (uint32_t)(((0xE0U << 16) & USB_OTG_HPTXFSIZ_PTXFD) | 0x300U);
+ USBx->DIEPTXF0_HNPTXFSIZ = (uint32_t)(((0x100UL << 16) & USB_OTG_NPTXFD) | 0x200U);
+ USBx->HPTXFSIZ = (uint32_t)(((0xE0UL << 16) & USB_OTG_HPTXFSIZ_PTXFD) | 0x300U);
/* Enable the common interrupts */
if (cfg.dma_enable == 0U)
@@ -1769,7 +1770,7 @@ HAL_StatusTypeDef USB_HC_Init(USB_OTG_GlobalTypeDef *USBx, uint8_t ch_num,
/* Program the HCCHAR register */
if ((epnum & 0x80U) == 0x80U)
{
- HCcharEpDir = (0x1U << 15) & USB_OTG_HCCHAR_EPDIR;
+ HCcharEpDir = (0x1UL << 15) & USB_OTG_HCCHAR_EPDIR;
}
else
{
@@ -1781,7 +1782,7 @@ HAL_StatusTypeDef USB_HC_Init(USB_OTG_GlobalTypeDef *USBx, uint8_t ch_num,
/* LS device plugged to HUB */
if ((speed == HPRT0_PRTSPD_LOW_SPEED) && (HostCoreSpeed != HPRT0_PRTSPD_LOW_SPEED))
{
- HCcharLowSpeed = (0x1U << 17) & USB_OTG_HCCHAR_LSDEV;
+ HCcharLowSpeed = (0x1UL << 17) & USB_OTG_HCCHAR_LSDEV;
}
else
{
@@ -1825,7 +1826,7 @@ HAL_StatusTypeDef USB_HC_StartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_HCTypeDe
/* in DMA mode host Core automatically issues ping in case of NYET/NAK */
if (dma == 1U)
{
- if ((hc->ep_type == EP_TYPE_CTRL) || (hc->ep_type == EP_TYPE_BULK))
+ if (((hc->ep_type == EP_TYPE_CTRL) || (hc->ep_type == EP_TYPE_BULK)) && (hc->do_ssplit == 0U))
{
USBx_HC((uint32_t)ch_num)->HCINTMSK &= ~(USB_OTG_HCINTMSK_NYET |
@@ -2110,7 +2111,7 @@ HAL_StatusTypeDef USB_HC_Halt(const USB_OTG_GlobalTypeDef *USBx, uint8_t hc_num)
if ((USBx->GAHBCFG & USB_OTG_GAHBCFG_DMAEN) == 0U)
{
- if ((USBx->HNPTXSTS & (0xFFU << 16)) == 0U)
+ if ((USBx->HNPTXSTS & (0xFFUL << 16)) == 0U)
{
USBx_HC(hcnum)->HCCHAR &= ~USB_OTG_HCCHAR_CHENA;
USBx_HC(hcnum)->HCCHAR |= USB_OTG_HCCHAR_CHENA;
@@ -2138,7 +2139,7 @@ HAL_StatusTypeDef USB_HC_Halt(const USB_OTG_GlobalTypeDef *USBx, uint8_t hc_num)
{
USBx_HC(hcnum)->HCCHAR |= USB_OTG_HCCHAR_CHDIS;
- if ((USBx_HOST->HPTXSTS & (0xFFU << 16)) == 0U)
+ if ((USBx_HOST->HPTXSTS & (0xFFUL << 16)) == 0U)
{
USBx_HC(hcnum)->HCCHAR &= ~USB_OTG_HCCHAR_CHENA;
USBx_HC(hcnum)->HCCHAR |= USB_OTG_HCCHAR_CHENA;
@@ -2169,7 +2170,7 @@ HAL_StatusTypeDef USB_HC_Halt(const USB_OTG_GlobalTypeDef *USBx, uint8_t hc_num)
* @param ch_dir Host Channel direction
* @retval HAL state
*/
-HAL_StatusTypeDef USB_HC_Activate(USB_OTG_GlobalTypeDef *USBx, uint8_t ch_num, uint8_t ch_dir)
+HAL_StatusTypeDef USB_HC_Activate(const USB_OTG_GlobalTypeDef *USBx, uint8_t ch_num, uint8_t ch_dir)
{
UNUSED(ch_dir);
@@ -3390,7 +3391,7 @@ HAL_StatusTypeDef USB_HC_Init(USB_DRD_TypeDef *USBx, uint8_t phy_ch_num,
USB_CHEP_KIND |
USB_CHEP_ERRTX |
USB_CHEP_ERRRX |
- (0xFU << 27));
+ (0xFUL << 27));
/* Set device address and Endpoint number associated to the channel */
wChRegVal |= (((uint32_t)dev_address << USB_CHEP_DEVADDR_Pos) |
@@ -3678,13 +3679,13 @@ static HAL_StatusTypeDef USB_HC_BULK_DB_StartXfer(USB_DRD_TypeDef *USBx,
/**
* @brief Halt a host channel in
* @param USBx Selected device
- * @param hc_num Host Channel number
+ * @param phy_ch_num Host Channel number
* @retval HAL state
*/
-HAL_StatusTypeDef USB_HC_IN_Halt(USB_DRD_TypeDef *USBx, uint8_t phy_ch)
+HAL_StatusTypeDef USB_HC_IN_Halt(USB_DRD_TypeDef *USBx, uint8_t phy_ch_num)
{
/* Set disable to Channel */
- USB_DRD_SET_CHEP_RX_STATUS(USBx, phy_ch, USB_CH_RX_DIS);
+ USB_DRD_SET_CHEP_RX_STATUS(USBx, phy_ch_num, USB_CH_RX_DIS);
return HAL_OK;
}
@@ -3693,13 +3694,13 @@ HAL_StatusTypeDef USB_HC_IN_Halt(USB_DRD_TypeDef *USBx, uint8_t phy_ch)
/**
* @brief Halt a host channel out
* @param USBx Selected device
- * @param hc_num Host Channel number
+ * @param phy_ch_num Host Channel number
* @retval HAL state
*/
-HAL_StatusTypeDef USB_HC_OUT_Halt(USB_DRD_TypeDef *USBx, uint8_t phy_ch)
+HAL_StatusTypeDef USB_HC_OUT_Halt(USB_DRD_TypeDef *USBx, uint8_t phy_ch_num)
{
/* Set disable to Channel */
- USB_DRD_SET_CHEP_TX_STATUS(USBx, phy_ch, USB_CH_TX_DIS);
+ USB_DRD_SET_CHEP_TX_STATUS(USBx, phy_ch_num, USB_CH_TX_DIS);
return HAL_OK;
}
@@ -3707,21 +3708,21 @@ HAL_StatusTypeDef USB_HC_OUT_Halt(USB_DRD_TypeDef *USBx, uint8_t phy_ch)
/**
* @brief Activate a host channel
* @param USBx Selected device
- * @param ch_num Host Channel number
+ * @param phy_ch_num Host Channel number
* @param ch_dir Host Channel direction
* @retval HAL state
*/
-HAL_StatusTypeDef USB_HC_Activate(USB_DRD_TypeDef *USBx, uint8_t phy_ch, uint8_t ch_dir)
+HAL_StatusTypeDef USB_HC_Activate(USB_DRD_TypeDef *USBx, uint8_t phy_ch_num, uint8_t ch_dir)
{
if (ch_dir == CH_IN_DIR)
{
/* Enable TX host Channel */
- USB_DRD_SET_CHEP_TX_STATUS(USBx, phy_ch, USB_CH_TX_VALID);
+ USB_DRD_SET_CHEP_TX_STATUS(USBx, phy_ch_num, USB_CH_TX_VALID);
}
else
{
/* Enable RX host Channel */
- USB_DRD_SET_CHEP_RX_STATUS(USBx, phy_ch, USB_CH_RX_VALID);
+ USB_DRD_SET_CHEP_RX_STATUS(USBx, phy_ch_num, USB_CH_RX_VALID);
}
return HAL_OK;
diff --git a/system/Drivers/STM32YYxx_HAL_Driver_version.md b/system/Drivers/STM32YYxx_HAL_Driver_version.md
index 71c0cd92cc..02aa7cf49b 100644
--- a/system/Drivers/STM32YYxx_HAL_Driver_version.md
+++ b/system/Drivers/STM32YYxx_HAL_Driver_version.md
@@ -21,7 +21,7 @@
* STM32U5: 1.6.2
* STM32WB: 1.14.6
* STM32WB0: 1.4.0
- * STM32WBA: 1.7.0
+ * STM32WBA: 1.8.0
* STM32WL: 1.4.0
* STM32WL3: 1.2.0
diff --git a/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h b/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h
index aa14075a16..e357caff31 100644
--- a/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h
+++ b/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h
@@ -73,7 +73,6 @@ extern "C" {
#define HAL_UART_MODULE_ENABLED
#define HAL_USART_MODULE_ENABLED
#define HAL_WWDG_MODULE_ENABLED
-#define HAL_XSPI_MODULE_ENABLED
#endif
/* ########################## Oscillator Values adaptation ####################*/
@@ -195,7 +194,6 @@ extern "C" {
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
-#define USE_HAL_XSPI_REGISTER_CALLBACKS 0U /* XSPI register callback disabled */
/* ################## SPI peripheral configuration ########################## */
@@ -353,10 +351,6 @@ extern "C" {
#include "stm32wbaxx_hal_wwdg.h"
#endif /* HAL_WWDG_MODULE_ENABLED */
-#ifdef HAL_XSPI_MODULE_ENABLED
-#include "stm32wbaxx_hal_xspi.h"
-#endif /* HAL_XSPI_MODULE_ENABLED */
-
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**