2024-08-11 02:35 PM
I'm facing the issue were the USB connection is re-connecting, which results that STM32CubeProgrammer re-flashing the device over and over again when the fip-boot has be fully loaded.
So what can cause this restarting and re-connection? Is it something with U-boot?
I have heard that CubeProgrammer may having some issues with timeouts, but in this case, the board is just restarting itself. FAQ : STM32MP1 STM32CubeProgrammer USB reconnect e... - STMicroelectronics Community
Here is the flashlayout:
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp151a-stm32-computer-firmware-mx-usb.stm32
- 0x03 fip-boot FIP none 0x0 fip/fip-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.bin
P 0x04 fsbl1 Binary mmc1 boot1 arm-trusted-firmware/tf-a-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.stm32
P 0x05 fsbl2 Binary mmc1 boot2 arm-trusted-firmware/tf-a-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.stm32
P 0x06 metadata1 FWU_MDATA mmc1 0x00080000 arm-trusted-firmware/metadata.bin
P 0x07 metadata2 FWU_MDATA mmc1 0x00100000 arm-trusted-firmware/metadata.bin
P 0x08 fip-a FIP mmc1 0x00180000 fip/fip-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.bin
PED 0x09 fip-b FIP mmc1 0x00580000 none
PED 0x0A u-boot-env ENV mmc1 0x00980000 none
P 0x10 bootfs System mmc1 0x00A00000 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
P 0x11 vendorfs FileSystem mmc1 0x04A00000 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
P 0x12 rootfs FileSystem mmc1 0x05A00000 st-image-weston-openstlinux-weston-stm32mp1.ext4
P 0x13 userfs FileSystem mmc1 0x33A00000 st-image-userfs-openstlinux-weston-stm32mp1.ext4
Here is the last part of the log:
I/TC: DTB enables console (non-secure)
D/TC:0 0 call_initcalls:40 level 5 stm32mp_syscfg_enable_io_compensation()
D/TC:0 0 call_initcalls:40 level 5 init_pm_support()
D/TC:0 0 call_initcalls:40 level 5 probe_dt_drivers()
D/TC:0 0 stm32_tamp_parse_passive_conf:1608 Passive conf from dt: precharge=0, nb_sample=4, clk_div=16384
D/TC:0 0 stm32_tamp_parse_active_conf:1823 Active conf from dt: no filter clk_div=1
D/TC:0 0 gic_it_set_cpu_mask:350 cpu_mask: writing 0xff00 to 0xd86218e4
D/TC:0 0 gic_it_set_cpu_mask:352 cpu_mask: 0x300
D/TC:0 0 gic_it_set_prio:361 prio: writing 0x1 to 0xd86214e5
D/TC:0 0 add_node_to_probe:641 element: stm32_tamp_nvram on node nvram@5c00a100
D/TC:0 0 probe_driver_node:443 element: stm32-tamp on node tamp@5c00a000 initialized
D/TC:0 0 probe_driver_node:443 element: stm32_tamp_nvram on node nvram@5c00a100 initialized
D/TC:0 0 call_initcalls:40 level 6 init_stm32mp1_drivers()
D/TC:0 0 gic_it_set_cpu_mask:350 cpu_mask: writing 0x101ff01 to 0xd8621808
D/TC:0 0 gic_it_set_cpu_mask:352 cpu_mask: 0x1010101
D/TC:0 0 gic_it_set_prio:361 prio: writing 0x1 to 0xd8621409
D/TC:0 0 call_initcalls:40 level 6 stm32mp1_init_scmi_server()
D/TC:0 0 call_initcalls:40 level 6 stm32mp1_init_final_shres()
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp IWDG1 ( 0): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp USART1 ( 1): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp SPI6 ( 2): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp I2C4 ( 3): non-secure
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp RNG1 ( 4): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp HASH1 ( 5): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp CRYP1 ( 6): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp I2C6 ( 7): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp RTC ( 8): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp MCU ( 9): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp PLL3 (10): unregistered
D/TC:0 0 stm32mp1_init_final_shres:438 stm32mp MDMA (11): unregistered
D/TC:0 0 stm32_bsec_find_otp_in_nvmem_layout:644 nvmem cfg0_otp = 0: 0 bit offset: 0, length: 8
D/TC:0 0 check_rcc_secure_configuration:347 RCC/PWR secure hardening: TZEN enable, MCKPROT enable
D/TC:0 0 call_initcalls:40 level 6 stm32mp_syscfg_set_hslv()
D/TC:0 0 stm32_bsec_find_otp_in_nvmem_layout:644 nvmem hw2_otp = 6: 18 bit offset: 0, length: 32
D/TC:0 0 call_initcalls:40 level 6 init_low_power()
D/TC:0 0 gic_it_set_cpu_mask:350 cpu_mask: writing 0xff00 to 0xd86218b0
D/TC:0 0 gic_it_set_cpu_mask:352 cpu_mask: 0x300
D/TC:0 0 gic_it_set_prio:361 prio: writing 0x1 to 0xd86214b1
D/TC:0 0 call_initcalls:40 level 6 stm32mp1_init_lp_states()
D/TC:0 0 stm32mp1_init_lp_states:230 Power configuration: shutdown to 6, suspend to 2
D/TC:0 0 call_initcalls:40 level 6 regulator_core_init()
D/TC:0 0 call_initcalls:40 level 7 stm32_rng_release()
D/TC:0 0 call_initcalls:40 level 7 regulator_core_cleanup()
D/TC:0 0 regulator_core_cleanup:916 disable usb33
D/TC:0 0 regulator_core_cleanup:916 disable reg18
D/TC:0 0 regulator_core_cleanup:916 disable reg11
D/TC:0 0 call_initcalls:40 level 7 release_probe_lists()
D/TC:0 0 call_finalcalls:59 level 1 release_external_dt()
I/TC: Primary CPU switching to normal world boot
I/TC: Forced system reset PSCI
NOTICE: CPU: STM32MP151AAC Rev.Z
NOTICE: Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
INFO: PMIC version = 0x21
WARNING: VDD unknown
INFO: Reset reason (0x54):
INFO: System reset generated by MPU (MPSYSRST)
INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: FCONF: Reading firmware configuration information for: stm32mp_fuse
INFO: Using USB
INFO: Instance 2
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.8-stm32mp1-r2.0(debug):fc5a7b038-dirty(fc5a7b03)
NOTICE: BL2: Built : 23:46:56, Aug 6 2024
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-DDR3L 16bits 533000kHz
INFO: Memory size = 0x20000000 (512 MB)
INFO: DFU USB START...
INFO: phase ID :3, Manifestation 3 at c71615b2
INFO: Send detach request
INFO: Receive DFU Detach
INFO: DFU USB STOP...
INFO: BL2: Loading image id 1
INFO: Loading image id=1 at address 0x2ffff000
INFO: Image id=1 loaded: 0x2ffff000 - 0x2ffff1ea
INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
INFO: FCONF: Reading firmware configuration information for: dyn_cfg
INFO: FCONF: Reading firmware configuration information for: stm32mp1_firewall
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0xde000000
INFO: Image id=4 loaded: 0xde000000 - 0xde00001c
INFO: OPTEE ep=0xde000000
INFO: OPTEE header info:
INFO: magic=0x4554504f
INFO: version=0x2
INFO: arch=0x0
INFO: flags=0x0
The full log: https://pastebin.com/7JWA3eEG
Here is the schematic of the USB. I'm using USB Micro.
This is the configuration of the USB-OTG for U-boot.
&usbotg_hs{
pinctrl-names = "default", "sleep";
pinctrl-0 = <&usb_otg_hs_pins_mx>;
pinctrl-1 = <&usb_otg_hs_sleep_pins_mx>;
status = "okay";
/* USER CODE BEGIN usbotg_hs */
/* This board does not have any USB-C connector */
/* USER CODE END usbotg_hs */
};
Full configuration here: Configuration U-Boot
Best regards
Solved! Go to Solution.
2024-08-12 09:43 AM
Here is the solution. Then it boots into U-boot.
alias {
serial0 = &uart4;
};
2024-08-12 09:43 AM
Here is the solution. Then it boots into U-boot.
alias {
serial0 = &uart4;
};