cancel
Showing results for 
Search instead for 
Did you mean: 

Help flashing through uart and stm32 cube programmer (newbie)

CHech.1
Associate III

Hi,

i'm a newbie to embedded programming.

Sorry in advance If this comes out a little bit confusing, it is because I'm confused and not sure precisely what to ask for.

I'm trying to flash the STM32F769I-DISCO through uart pins which connect to the board's gpio ports, and i'm a little bit lost about how to do it.

I think I'm not even connected properly.

my uart cables (one side usb other side rx,tx,ground) are connected to uart6, meaning gpio pins labeled D0 and D1 (and ground) as specified in the board's documentation.

I know that the pins are connected correctly to uart 6, as when I run my software (flashing through touchgfx designer) I can receive and send uart communication.

Only I'm not sure if those are the pins to which I should connect the uart in order to flash it to begin with 😅

When I try to connect via the CubeProgrammer I get:

Serial Port COM4 is successfully opened.

Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit=1.0, flow-control=off

Timeout error occured while waiting for acknowledgement.

Timeout error occured while waiting for acknowledgement.

Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again... 

I'd really appreciate some help!

Thank you

3 REPLIES 3
KnarfB
Principal III

Hi, when using system memory boot mode (built-in bootloader), not all UARTs and pin configs be used. In your case, only uart1 and uart3 would work, see

AN2606 Application note "STM32 microcontroller system memory boot mode".

An alternative could be using IAP (in applications programming) which is essentially a bootloader that you compile and flash once to a dedicated area in flash. More reading: X-CUBE-IAP-USART, AN4657 Application note "STM32 in-application programming (IAP) using the USART"

hth

KnarfB

Thank you for the quick answer!

Again, sorry for the newbie questions but I can't find anything online -

I saw in AN2606  that indeed I have to use uart1/uart3. But for example, it states that for uart 3 I have to use PB10 and PB11.

But I can't see any pins (or anything) named PB10/PB11 on my board.

As for pins that i can connect gpio's to, i can only see D0-D15 under CN13 and A0-A5 under CN14 + some ground/voltage related gpios.

Those are different naming schemes. D0-D15 and A0-A5 refer to Arduino pin names. You can forget about that, except you plan to add Arduino shields to the board. The systematic chip naming like PB10 means pin/bit number 10 of GPIO port B (GPIOB in code). The schematics near the end of UM2033

User manual "Discovery kit with STM32F769NI MCU" show the correspondences.

hth

KnarfB