cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157C-DK2 Uart Boot

ANiko.3
Associate II

Is it possible to boot over UART on the STM32MP157C-DK2?

I set the BOOT pins as following:

BOOT0 - OFF

BOOT1 - OFF

I am using the FT232 UART-USB Adapter and have connected the following pins:

  • UART GND - CN16 GND
  • UART VCC - CN16 3.3V
  • UART TX - CN14 ARD_D1
  • UART RX - CN14 ARD_D0

Here is the CubeProgrammer command and its output:

´´´

$ STM32_Programmer_CLI -c port=/dev/ttyUSB0

     -------------------------------------------------------------------

                       STM32CubeProgrammer v2.5.0                 

     -------------------------------------------------------------------

Serial Port /dev/ttyUSB0 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...

´´´​

Am I doing something wrong?

Regards,

Aleksandar

14 REPLIES 14
ANiko.3
Associate II

Hi Patrick,

I havent added a pull-up, Ill do it today and check the results. So basically the ROM cannot detect that USART3 TX is activated? And adding a pull-up on it could fix i?

Regards

This is not related to the ROM, but rather on your UART<->USB cable behavior in case TX is Hi-Z.

In order to avoid any interaction on user board, each UART_TX are kept Hi-Z until the 0x7F is received on one valid RX pin. Then the related TX is enabled (i.e. driven high) and the ROM send acknowledge. Your cable might detect the transition from Hi-Z to high as a character (or an end of 'break' state) and might not correctly manage the first data.

But even without pull-up, you should see some activity on the TX line if you put an analyzer/oscilloscope. Are you sure of your cable wirings (signals and power) ?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
ANiko.3
Associate II

The wiring is okay, Ive checked it many times. I measured the data on the TX Pin (CN2 PIN 10 GPIO15), the 0x7F is detected, but no activity on the RX pin (CN2 PIN 8 GPIO14). Ill measure everything today again (with and without the pull-up) and write the results here.

Regards

ANiko.3
Associate II

Hi Patrick,

we have changed the USB-UART Adapter and it should work soon. However, I am still wondering about the flashing. You mentioned we cannot flash over UART at the moment and we need some uBoot changes to avoid conflict with uBoot Console. Could you point me to someone who could help me with the necessary changes in U-Boot?

Regards

Olivier GALLIEN
ST Employee

Hi @Community member​ 

Please give it a try with a freshly release DV2.1 (see wiki) , taking care to enable usart3 in Uboot DT ( disabled by default)

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.