cancel
Showing results for 
Search instead for 
Did you mean: 

USB not detected and UART timeout error on custom STM32MP157DAC1 board

mittyan321
Associate

Hello,

I have developed a custom board using the STM32MP157DAC1. The pin layout is nearly identical to the STM32MP157-DK2 for all pins with the same name.

I am trying to flash an SD card image using STM32CubeProgrammer, but I'm facing two critical issues.

1. USB Device Not Recognized

My primary issue is that the USB connection is not recognized by my PC at all when I try to connect in DFU mode. I cannot get any response from the device over USB.

I have attached a schematic of my USB circuit. Please note that I initially had an error where the DP and DM lines were crossed, but this has since been corrected on the board. Despite the fix, the USB port remains unresponsive.

2. UART Flashing Fails with Timeout Error

As a workaround, I attempted to flash the image via UART. The process starts, and the first stage bootloader (tf-a- ... .stm32) appears to download successfully. However, the process then fails with multiple timeout errors when trying to get the next phase.

Here is the log from STM32CubeProgrammer:

18:58:28 : Read TSV File: C:\temp\flashlayout_st-image-core\optee\FlashLayout_sdcard_stm32mp157d-dk1-optee.tsv
18:58:28 : Number of partitions: 13
18:58:33 : RTS low
18:58:33 : DTR Low
18:58:33 : Serial Port COM10 is successfully opened.
18:58:33 : Port configuration: parity = even, baudrate = 115200, data-bit = 8,           stop-bit = 1.0, flow-control = off
18:58:34 : Activating device: OK
18:58:34 : Board   : --
18:58:34 : Chip ID: 0x500 
18:58:34 : BootLoader protocol version: 4.0
18:58:35 : Start Embedded Flashing service
18:58:36 : Opening and parsing file: tf-a-stm32mp157d-dk1-optee-programmer-usb.stm32
18:58:36 : Memory Programming ...
18:58:36 :   File      : tf-a-stm32mp157d-dk1-optee-programmer-usb.stm32
18:58:36 :   Size      : 220.41 KB 
18:58:36 :   Partition ID : 0x01 
18:58:36 : Download in Progress:
18:59:32 : File download complete
18:59:32 : Time elapsed during download operation: 00:00:56.471
18:59:32 : RUNNING Program ... 
18:59:32 :   PartID:   :0x01 
18:59:32 : Start operation done successfully at partition 0x01
19:00:04 : Timeout error occured while waiting for acknowledgement.
19:00:35 : Timeout error occured while waiting for acknowledgement.
19:01:06 : Timeout error occured while waiting for acknowledgement.
19:01:37 : Timeout error occured while waiting for acknowledgement.
19:02:08 : Timeout error occured while waiting for acknowledgement.
19:02:08 : Error: GetPhase command not acknowledged after several retries!
19:02:08 : Error: Parition 0xBB not found in TSV File 
19:02:08 : Error: TSV flashing service failed
19:02:08 : Disconnected from device.

Could you please provide some guidance on the following questions?

  • What could be the potential reasons for the USB interface not being detected by the PC, even after fixing the DP/DM lines?

  • Why might the UART programming be failing with a "GetPhase command not acknowledged" error after the initial TF-A file is downloaded?

Any help or suggestions would be greatly appreciated.

Thank you.

0 REPLIES 0