Skip to content

Commit f9763e9

Browse files
committed
ext: stm32cube: revert 71ba2de and 9a89320
Revert 71ba2de: ext: stm32cube: stm32f4xx: shift I2SR field in PLLI2SCFGR register (ST Bug tracker ID: 50086) Revert 9a89320: ext: stm32cube: stm32f7xx: shift I2SR field in PLLI2SCFGR register (ST Bug tracker ID: 50108) This two commits were introduced to shift the PLLR parameter according to the PLL register field position. After analysis, it appears that function is actually correct, and issue was actually in parameters provided that didn't match the API. (see PR #12609) Signed-off-by: Armando Visconti <[email protected]>
1 parent f012084 commit f9763e9

File tree

4 files changed

+4
-19
lines changed

4 files changed

+4
-19
lines changed

ext/hal/st/stm32cube/stm32f4xx/README

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ Patch List:
4444
drivers/include/stm32f4xx_hal_conf.h
4545
ST Bug tracker ID: NA. Not a stm32cube issue
4646

47-
*Add correct shifting to I2SR field in PLLI2SCFGR register
48-
The I2SR field should be shifted by RCC_PLLI2SCFGR_PLLI2SR_Pos when the PLLI2SCFGR register
49-
is read or written.
50-
Impacted files:
51-
drivers/include/stm32f4xx_ll_rcc.h
52-
ST Bug tracker ID: 50086
53-
5447
*Disable new CAN API and enable Legacy API
5548
A new CAN API has been delivered on recent F4 stm32cube.
5649
This new API breaks current CAN driver. Disable the new API and enable the

ext/hal/st/stm32cube/stm32f4xx/drivers/include/stm32f4xx_ll_rcc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5685,7 +5685,7 @@ __STATIC_INLINE void LL_RCC_PLLI2S_ConfigDomain_I2S(uint32_t Source, uint32_t PL
56855685
#else
56865686
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLM, PLLM);
56875687
#endif /* RCC_PLLI2SCFGR_PLLI2SM */
5688-
MODIFY_REG(RCC->PLLI2SCFGR, RCC_PLLI2SCFGR_PLLI2SN | RCC_PLLI2SCFGR_PLLI2SR, PLLN << RCC_PLLI2SCFGR_PLLI2SN_Pos | PLLR << RCC_PLLI2SCFGR_PLLI2SR_Pos);
5688+
MODIFY_REG(RCC->PLLI2SCFGR, RCC_PLLI2SCFGR_PLLI2SN | RCC_PLLI2SCFGR_PLLI2SR, PLLN << RCC_PLLI2SCFGR_PLLI2SN_Pos | PLLR);
56895689
}
56905690

56915691
/**
@@ -5740,7 +5740,7 @@ __STATIC_INLINE uint32_t LL_RCC_PLLI2S_GetQ(void)
57405740
*/
57415741
__STATIC_INLINE uint32_t LL_RCC_PLLI2S_GetR(void)
57425742
{
5743-
return (uint32_t)(READ_BIT(RCC->PLLI2SCFGR, RCC_PLLI2SCFGR_PLLI2SR) >> RCC_PLLI2SCFGR_PLLI2SR_Pos);
5743+
return (uint32_t)(READ_BIT(RCC->PLLI2SCFGR, RCC_PLLI2SCFGR_PLLI2SR));
57445744
}
57455745

57465746
#if defined(RCC_PLLI2SCFGR_PLLI2SP)

ext/hal/st/stm32cube/stm32f7xx/README

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ Patch List:
4949
ST Bug tracker ID: 13359
5050

5151

52-
*Add correct shifting to I2SR field in PLLI2SCFGR register
53-
The I2SR field should be shifted by RCC_PLLI2SCFGR_PLLI2SR_Pos when the PLLI2SCFGR register
54-
is read or written.
55-
Impacted files:
56-
drivers/include/stm32f7xx_ll_rcc.h
57-
ST Bug tracker ID: 50108
58-
59-
6052
*Disable new CAN API and enable Legacy API
6153
A new CAN API has been delivered on recent F7 stm32cube.
6254
This new API breaks current CAN driver. Disable the new API and enable the

ext/hal/st/stm32cube/stm32f7xx/drivers/include/stm32f7xx_ll_rcc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4039,7 +4039,7 @@ __STATIC_INLINE void LL_RCC_PLLI2S_ConfigDomain_SPDIFRX(uint32_t Source, uint32_
40394039
__STATIC_INLINE void LL_RCC_PLLI2S_ConfigDomain_I2S(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR)
40404040
{
40414041
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
4042-
MODIFY_REG(RCC->PLLI2SCFGR, RCC_PLLI2SCFGR_PLLI2SN | RCC_PLLI2SCFGR_PLLI2SR, PLLN << RCC_PLLI2SCFGR_PLLI2SN_Pos | PLLR << RCC_PLLI2SCFGR_PLLI2SR_Pos);
4042+
MODIFY_REG(RCC->PLLI2SCFGR, RCC_PLLI2SCFGR_PLLI2SN | RCC_PLLI2SCFGR_PLLI2SR, PLLN << RCC_PLLI2SCFGR_PLLI2SN_Pos | PLLR);
40434043
}
40444044

40454045
/**
@@ -4090,7 +4090,7 @@ __STATIC_INLINE uint32_t LL_RCC_PLLI2S_GetQ(void)
40904090
*/
40914091
__STATIC_INLINE uint32_t LL_RCC_PLLI2S_GetR(void)
40924092
{
4093-
return (uint32_t)(READ_BIT(RCC->PLLI2SCFGR, RCC_PLLI2SCFGR_PLLI2SR >> RCC_PLLI2SCFGR_PLLI2SR_Pos));
4093+
return (uint32_t)(READ_BIT(RCC->PLLI2SCFGR, RCC_PLLI2SCFGR_PLLI2SR));
40944094
}
40954095

40964096
#if defined(RCC_PLLI2SCFGR_PLLI2SP)

0 commit comments

Comments
 (0)