Skip to main content
GBassi
Visitor II
July 15, 2021
Solved

Some USART2 #define seems to be missing from stm32g030xx.h, stm32g031xx.h, stm32g041xx.h

  • July 15, 2021
  • 3 replies
  • 943 views

stm32g030xx.h, stm32g031xx.h, stm32g041xx.h:

these #define seems to be missing/removed from aforementioned files:

#define RCC_CCIPR_USART2SEL_Pos     (2U)

#define RCC_CCIPR_USART2SEL_Msk     (0x3UL << RCC_CCIPR_USART2SEL_Pos)   /*!< 0x0000000C */

#define RCC_CCIPR_USART2SEL       RCC_CCIPR_USART2SEL_Msk

#define RCC_CCIPR_USART2SEL_0      (0x1UL << RCC_CCIPR_USART2SEL_Pos)   /*!< 0x00000004 */

#define RCC_CCIPR_USART2SEL_1      (0x2UL << RCC_CCIPR_USART2SEL_Pos)   /*!< 0x00000008 */

This topic has been closed for replies.
Best answer by TDK

Clock selection for USART2 isn't available on these devices per the RMs.

0693W00000CzhtiQAB.png 

0693W00000CzhtxQAB.png

3 replies

Technical Moderator
July 15, 2021

Hello @Community member​ and welcome to the Community :)

Thanks for your reported issue.

I will check this internally with the latest release of STM32CubeG0 package, and I will take the necessary action.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
TDK
TDKBest answer
Super User
July 15, 2021

Clock selection for USART2 isn't available on these devices per the RMs.

0693W00000CzhtiQAB.png 

0693W00000CzhtxQAB.png

"If you feel a post has answered your question, please click ""Accept as Solution""."
Technical Moderator
July 15, 2021

You are right @TDK​.

I checked the spec and I confirm that the USART2 is only applies to STM32G070xx and to STM32G0B0xx devices.

So, the HAL define is correct, and there is no missing.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks