cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G071GBUx Bootloader Setup Problem

YuXiao
Associate II

Hi, I am trying to configure my STM32G071GBU6 to enable reprogramming  the flash throguh USART1. I check the datasheet of STM32G071x8/xB, reference manual RM0444, and application note AN2026. It says I am supposed to configure the PA9 (USART1_Tx) and PA10 (USART1_Rx) pins. The problem is when I configure the USART1 as asynchronous mode in STM32CubeMX, the software automatically set PB6 and PB7 pins as USART1_Tx and USART1_Rx. There are no available options like USART1_Tx and USART1_Rx for PA9 and PA10.

I am wondering why the manual is inconsistent to the STM32CubeMX and how should I configure the MCU to correctly reprogram through USART1?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

 

That chip doesn't have PA9/PA10 exposed at reset. Use USART2 on PA2/PA3.

If CubeMX selects pins other than the ones you want, click the pins you want and select them for that function instead.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
Issamos
Lead II

Hello @YuXiao 

Re you using the last version of the STM32CubeMX (V6.16.0)? If so, what are the available options will trying to set the PA9 and PA10 to an alternate function (a screenshot will really be helpful).

Best Regards.

II

Thanks for your reply. I just updated to the latest version of the STM32CubeMX, but nothing change. Alternate functions of PA9 and PA10 are attached. The only way to include PA9 and PA10 into USART1 is to enable hardware flow control of RS232 or RS485. However, this will only configure PA9 and PA10 as something like CTS and RTS rather than USART1_Tx and USART1_Rx.

TDK
Super User

 

That chip doesn't have PA9/PA10 exposed at reset. Use USART2 on PA2/PA3.

If CubeMX selects pins other than the ones you want, click the pins you want and select them for that function instead.

If you feel a post has answered your question, please click "Accept as Solution".
YuXiao
Associate II

Thanks for your reply! I also found out that USART2 seems to be a feasible solution to implement the function I want. I will try this setup and see if it works.