Skip to content

STM32C051xx missing GPIO_AF0_USART2 definition #4

@fpistm

Description

@fpistm

According to datasheet DS14721 Rev 2, PD3 can have USART2_CTS/USART2_NSS with AF0 but HAL GPIO does not define it for this part number:

#if defined(STM32C031xx) || defined(STM32C071xx) || defined(STM32C091xx) || defined(STM32C092xx)
#define GPIO_AF0_USART2 ((uint8_t)0x00) /*!< USART2 Alternate Function mapping */
#endif /* STM32C031xx | STM32C071xx | STM32C091xx | STM32C092xx*/

Proposed patch:

- #if defined(STM32C031xx) || defined(STM32C071xx) || defined(STM32C091xx)  || defined(STM32C092xx) 
+ #if defined(STM32C031xx) || defined(STM32C051xx) || defined(STM32C071xx) || defined(STM32C091xx)  || defined(STM32C092xx) 
 #define GPIO_AF0_USART2        ((uint8_t)0x00)  /*!< USART2 Alternate Function mapping */ 
- #endif /* STM32C031xx | STM32C071xx | STM32C091xx | STM32C092xx*/ 
+ #endif /* STM32C031xx | STM32C051xx | STM32C071xx | STM32C091xx | STM32C092xx*/ 
Image

Issue reported by @nessotrin in a PR:
stm32duino/Arduino_Core_STM32#2791

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggpioGeneral Purpose Inputs and OutputshalHAL-LL driver-related issue or pull-requestinternal bug trackerIssue confirmed and logged into the internal bug tracking system

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions