cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157C-DK2 disconnects during flashing an is unable to reconnect. Alpha HW?

LFlic
Associate

When trying to flash OpenSTLinux on the STM32MP157C-DK2 the flashing procedure gets halted with the following error message.

16:01:00 : STM32CubeProgrammer API v2.1.0
16:01:01 : USB speed : High Speed (480MBit/s)
16:01:01 : Manuf. ID : STMicroelectronics
16:01:01 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
16:01:01 : SN : 000000000000
16:01:01 : FW version : 0x011a
16:01:01 : Device ID : 0x0500
16:01:19 : Read TSV File: C:\Users\Ludwig\Downloads\en.FLASH-stm32mp1-openstlinux-4.19-thud-mp1-19-02-20\stm32mp1-openstlinux-4.19-thud-mp1-19-02-20\images\stm32mp1\flashlayout_st-image-weston\FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv
16:01:19 : Number of partitions: 9
16:01:40 : Start Embedded Flashing service
16:01:40 : Memory Programming ...
16:01:40 : Opening and parsing file: tf-a-stm32mp157c-dk2-trusted.stm32
16:01:40 : File : tf-a-stm32mp157c-dk2-trusted.stm32
16:01:40 : Size : 245360 Bytes
16:01:40 : Partition ID : 0x01
16:01:40 : Download in Progress:
16:01:40 : File download complete
16:01:40 : Time elapsed during download operation: 00:00:00.630
16:01:40 : RUNNING Program ...
16:01:40 : PartID: :0x01
16:01:41 : Start operation done successfully at partition 0x01
16:01:41 : Flashlayout Programming ...
16:01:41 : Running Flashlayout Partition ...
16:01:41 : Flashlayout partition started successfully
16:01:41 : Memory Programming ...
16:01:41 : Opening and parsing file: u-boot-stm32mp157c-dk2-trusted.stm32
16:01:41 : File : u-boot-stm32mp157c-dk2-trusted.stm32
16:01:41 : Size : 748660 Bytes
16:01:41 : Partition ID : 0x03
16:01:41 : Download in Progress:
16:01:42 : File download complete
16:01:42 : Time elapsed during download operation: 00:00:01.138
16:01:42 : RUNNING Program ...
16:01:42 : PartID: :0x03
16:01:42 : reconnecting the device ...
16:02:12 : Error: unable to reconnect the target device: time out expired
16:02:12 : Error: Start operation failed at partition 0x03
16:02:12 : Error: TSV flashing service failed
16:02:12 : Warning: Connection to device 0x500 is lost

While researching, I stumbled over this particular thread: https://community.st.com/s/question/0D50X0000AgE1buSQC/cant-flash-sd-card-on-stm32mp157xev1-process-stops . This guy had a similar problem as I do. My MB1272 is also green instead of blue like on all the images I saw. This device was provided to me as a part of an urgent project, but I can't seem to get it working. Please provide a solution for me, so I can start working. Thanks to anyone in advance!

15 REPLIES 15

I assume that A7 will be signaled if M4 crashes (ex. hard fault) so it can wakeup and reset it, right?

Other question is that if SDIO can be asigned to M4 when A7 goes to sleep.

I would like to switch wifi/ble to M4 when A7 in low power mode.

I confirm, WWDG expiration reset the M4 and it signaled to A7 (with potentially wake up). You can chose to restart M4 automatically with RCC_MP_GCR.BOOT_MCU=1 or assume the A7 will restart the M4 after potentially do some checks before reloaded/restart the M4 code.

SDIO sharing between Linux and M4 is not supported in our SW deliveries. It will be very complex as, when going to low power, Linux will stop services of the IPs and cut clocks.

HW wise (e.g. RCC, interrupt, etc...), it will be possible, but very complex to manage a clean handover. This should be, in any case, your own development.

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.

Thanks for the help.

Does it mean "restart M4 automatically with RCC_MP_GCR.BOOT_MCU=1" that A7 can still sleep and should not do anything?

Also is it possible to force A7 to use internal RAM when it is running uBoot or custom bare metal code?

Yes, BOOT_MCU=1 is to allow automatic restart of M4 after WWDG expiration or SYSRESETQ. If wake up on these signals is not set up on A7, for sure it keep its current low power state.

There is no specific way to 'force A7 to use internal RAM', it is up to your SW mapping to ensure it will fit in SYSRAM.

But due to limited amount of SYSRAM (SRAMs could also be used if not used in your M4 FW) the application cases are very limited.

FYI, uBoot SPL (Basic boot chain) is fully running from SYSRAM (used only for DDR Tools test purposes). see https://wiki.st.com/stm32mpu/wiki/Boot_chains_overview#Overview_2. basic boot chain only offer limited uBoot capabilites, only TF-A+uBoot (Trusted boot chain) is supported for an OpenSTLinux product.

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.

What are the minimum RAM size and FLASH size to run Linux?

Also looks like stm32MP1 does not have CAN bus, is it right?

For better community usage, for new question/concern, it is recommended to open a new thread.

Some STM32MP1 part number have CAN bus https://www.st.com/content/st_com/en/products/microcontrollers-microprocessors/stm32-arm-cortex-mpus/stm32mp1-series.html

For recommended memory size, please have a look to STM32MP1 EXTMEM training https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-online-training/stm32mp1-online-training.html

0690X00000AtNYkQAN.jpg

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.