2019-06-18 07:49 AM
Hi everyone,
I'm trying to carry the first tests on our STM32MPU157A-EV1 based board but it automatically turns itself off after 17 seconds, what could be the cause of that?
It actually allows me to start the SD card flashing process as stated here in step 6:
However, as it always turns itself off after 17s of being powered, it can never finish the process.
Here's a log of the process:
-------------------------------------------------------------------
STM32CubeProgrammer v2.1.0
-------------------------------------------------------------------
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 000000000000
FW version : 0x011a
Device ID : 0x0500
Device name : STM32MPxxx
Device type : MPU
Device CPU : Cortex-A7
Start Embedded Flashing service
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-ev1-trusted.stm32
File : tf-a-stm32mp157c-ev1-trusted.stm32
Size : 245360 Bytes
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:03.229
RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01
Flashlayout Programming ...
[==================================================] 100%
Running Flashlayout Partition ...
Flashlayout partition started successfully
Memory Programming ...
Opening and parsing file: u-boot-stm32mp157c-ev1-trusted.stm32
File : u-boot-stm32mp157c-ev1-trusted.stm32
Size : 754169 Bytes
Partition ID : 0x03
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:09.183
RUNNING Program ...
PartID: :0x03
reconnecting the device ...
Error: unable to reconnect the target device: time out expired
Error: Start operation failed at partition 0x03
Error: TSV flashing service failed
Can anyone shine a light on what could be the cause of the shutdown?
Kind regards,
Jesús.
Solved! Go to Solution.
2019-06-19 03:03 AM
If you use the u-Boot binary intended for EV1, u-Boot expect to run on a 24MHz oscillator (XO) and change the HSE mode to Bypass mode as soon as it start.
There is no automatic detection between XTAL or XO in the provided u-Boot (although the BootROM is able to do that at run-time, this is why you are able to partly start the CubeProgrammer, u-Boot use a compile time fixed setting).
If you have a crystal on your board, you need to change the device tree according to your HW and rebuild it.
Regards
2019-06-18 08:38 AM
Seems you already post similar issue (https://community.st.com/s/question/0D50X0000AgE1buSQC/cant-flash-sd-card-on-stm32mp157xev1-process-stops)
You log shows that partition #1 and #3 are correctly loaded in respectively SYSRAM (TF-A), then DDR (u-Boot).
After that steps, u-Boot is started on the target and there is an USB re-enumeration to get Flash access for programming.
I suspect your u-Boot is not compatible with the board you use.
Nevertheless, please check if adding "-tm 20000" to the CubeProgrammer command line helps.
Could you confirm that you have an MB1262C + MB1263C boards ? Official SW delivery is not compatible with preliminary boards.
If you get Alpha HW (e.g. MB1263B), you should ask for a replacement from the channel which provide it to you.
2019-06-18 09:09 AM
Hi Patrick, thanks for answering.
Maybe it's not very clear on the title, my bad: This issue I'm having now it's happening with our own hardware design that is based off the EV1 schematics.
The reason I didn't post this on the other thread you mention is because it doesn't matter what I do with the board, if I don't try to flash the SD and just power up the board without doing anything, it will still shut down after 17 seconds.
Thus, I think the Alpha HW issue doesn't apply here.
2019-06-18 11:50 PM
Hello,
Difficult to help without having details on your HW set-up.
What do you mean by 'shutdown' ? Supply power-off or crash ? All supplies or some of them ? short shutdown then restart ?
Did you use STPMIC1A ?
Did you check you VIN supply ? if falling too low, STPMIC1A will shutdown.
Did you have a 24MHz crystal or an oscillator on HSE pins (OSC_IN/OSC_OUT) ?
Which software are loaded on the board ?
Which Boot[2:0] pin setting ?
Did you program something on STM32MP15x OTP Fuses ?
Any console log ?
The Sd-Card programming log you show does not make evidence of issue (except that the u-Boot you loaded is not starting,, which could me)
2019-06-19 02:46 AM
Hi Patrick,
Thank you for your answer, while getting all the info ready to answer you, I found the main issue: The PONKEY_N signal in our design had been left at low level, apparently that was what caused the STPMIC1A to go down after a certain period of time.
Now that the board doesn't turn itself off, I'm having the issue you mentioned of the USB re-enumeration to get Flash access for programming. I'l have to take a look into the U-boot.
Tried "-tm 20000" as you suggested but still get the same result. Could it be that the silicon units we got are also Alpha HW thus that being the origin of this new issue?
Here's what reads now:
$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_emmc_stm32mp157c-ev1-trusted.tsv -tm 20000
-------------------------------------------------------------------
STM32CubeProgrammer v2.1.0
-------------------------------------------------------------------
Warning: Timeout is forced to 20000 ms
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 000000000000
FW version : 0x011a
Device ID : 0x0500
Device name : STM32MPxxx
Device type : MPU
Device CPU : Cortex-A7
Start Embedded Flashing service
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-ev1-trusted.stm32
File : tf-a-stm32mp157c-ev1-trusted.stm32
Size : 245360 Bytes
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:03.984
RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01
Flashlayout Programming ...
[==================================================] 100%
Running Flashlayout Partition ...
Flashlayout partition started successfully
Memory Programming ...
Opening and parsing file: u-boot-stm32mp157c-ev1-trusted.stm32
File : u-boot-stm32mp157c-ev1-trusted.stm32
Size : 754169 Bytes
Partition ID : 0x03
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:11.240
RUNNING Program ...
PartID: :0x03
reconnecting the device ...
Error: unable to reconnect the target device: time out expired
Error: Start operation failed at partition 0x03
Error: TSV flashing service failed
And here's what I get on the serial port:
NOTICE: CPU: STM32MP157A?? Rev.A
NOTICE: Model: STMicroelectronics STM32MP157C eval daughter on eval mother
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: Using USB
INFO: Instance 2
INFO: Boot used partition fsbl1
INFO: Product_below_2v5=1: HSLVEN update is
INFO: destructive, no update as VDD>2.7V
NOTICE: BL2: v2.0(debug):
NOTICE: BL2: Built : 13:13:37, Oct 2 2018
INFO: BL2: Doing platform setup
INFO: PMIC version = 0x00
INFO: RAM: DDR3-1066/888 bin G 2x4Gb 533MHz v1.41
INFO: Memory size = 0x40000000 (1024 MB)
INFO: BL2 runs SP_MIN setup
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2fff0000
INFO: Image id=4 loaded: 0x2fff0000 - 0x30000000
INFO: BL2: Loading image id 5
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Receive DFU abort
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Start Download partition 0 to address 0xc0000000 length 0
INFO: USB : DFU : end of download partition : 0
INFO: Loading image id=5 at address 0xc0100000
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: receive request 6
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffee768
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: usb_partition_size: partition size : 0xb80f9
INFO: Start Download partition 3 to address 0xc0100000 length 753913
INFO: USB : DFU : end of download partition : 3
WARNING: Skip signature check (header option)
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0xffffffff
INFO: Send detach request
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Receive Detach
INFO: Image id=5 loaded: 0xc0100000 - 0xc01b80f9
INFO: read version 0 current version 0
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2fff0000
INFO: SPSR = 0x1d3
INFO: PMIC version = 0x00
NOTICE: SP_MIN: v2.0(debug):
NOTICE: SP_MIN: Built : 13:13:37, Oct 2 2018
INFO: ARM GICv2 driver initialized
▒M}qb*▒▒l▒mdJ▒Α
/▒P▒▒ '▒2▒1▒"
5▒H,▒\▒▒▒%}q▒▒ٟ0▒▒bi,▒:@▒1111111m$P
Anyhow let me answer your questions for further reference:
2019-06-19 03:03 AM
If you use the u-Boot binary intended for EV1, u-Boot expect to run on a 24MHz oscillator (XO) and change the HSE mode to Bypass mode as soon as it start.
There is no automatic detection between XTAL or XO in the provided u-Boot (although the BootROM is able to do that at run-time, this is why you are able to partly start the CubeProgrammer, u-Boot use a compile time fixed setting).
If you have a crystal on your board, you need to change the device tree according to your HW and rebuild it.
Regards
2019-06-19 05:53 AM
Thank you Patrick, I'll take a look into rebuilding the device tree. In fact, I already obtained the stm32mp157c-mx.dts, stm32mp157c-mx.h and stm32mp157c-mx-u-boot.dts from the STM32Cube after setting everything as it is on our design, next step would be to rebuild the device tree I guess.
Once again, thanks a lot!
Kind regards,
Jesús.
P.D: I compared the UART log vs the one I obtained in the past with the EV1 with Alpha version of the HW and they look exactly the same except for the reset reason, (rst_por instead of NRST).