cancel
Showing results for 
Search instead for 
Did you mean: 

How to use USART1 with PA10 and PA9 pins?

is45
Associate II

Hello, I am using an STM32 Nucleo F746ZG board.

I need to make an application where one board can transmit some firmware over to the second board via UART, and the second board will use it's default bootloader to read and flash that firmware.

However, according to documentation I read here: https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf, on page 212, it mentions that the bootloader can only use USART1 or USART3. I cannot use USART3, since I am already using that as a VCP for debugging printf messages. Thus, I have to use USART1. However, the problem is that the USART1 pins, PA10 and PA9 pins it requires me to use, are already being used here:

is45_0-1750215016048.png

The PA10 pin is being used as USB_OTG_FS_ID, and the PA9 pin is being used as USB_OTG_FS_VBUS. From what I read online, I think these pins are important if I want the STM32 to communicate with my laptop right? If so, then how am I expected to use USART1 to flash firmware when my board is running the default bootloader?

I feel like I am missing something, since the default bootloader would not give USART1 as an option if there wasn't any way to use it.

I would greatly appreciate any help. Thank you!

1 REPLY 1
KnarfB
Super User

I think these pins are important if I want the STM32 to communicate with my laptop right?

Sometimes connecting only DP and DN is sufficient, depends on the use case. See  

Introduction to USB hardware and PCB guidelines using STM32 MCUs - Application note

 

You may adapt the ST provided bootloader middleware to use whatever pins you prefer: STMicroelectronics/stm32-mw-openbl: Provides the Open Bootloader library, part of the STM32Cube MCU Component "middleware", for all STM32xx series.

But this takes extra Flash space and development efforts. Maybe a simpler home grown update protocol is sufficient for you.

Maybe you can use DFU firmware update via that USB connection? 

hth

KnarfB