Skip to main content
IIvan.6
Associate II
August 13, 2021
Question

STM32L051 PA12 not set and always 0 (RTS problem). How can I use PA12? I'm already found that PIN always set as RTS and read errata for my MCU that states "Configure as alternate function after setting the UE and RE bits." How to use PA12 as GPIO?

  • August 13, 2021
  • 2 replies
  • 755 views

..

This topic has been closed for replies.

2 replies

TDK
August 14, 2021

> How to use PA12 as GPIO?

Set the pin to GPIO with the MODER register using HAL_GPIO_Init or similar. Same as any other pin.

The errata note is not relevant here if you don't need RTS functionality.

"If you feel a post has answered your question, please click ""Accept as Solution""."
IIvan.6
IIvan.6Author
Associate II
August 14, 2021

But I can't change its state!