Skip to main content
Lead
August 12, 2024
Solved

How do I start the PER clock? U-boot won't boot

  • August 12, 2024
  • 1 reply
  • 1668 views

I never heard about the PER clock. I'm looking inside CubeMX, but I don't see any PER clock at all. I guess it's periferial clock. So how do I start it?

 

My U-boot won't boot. I guess that if PER will be like 24 MHz, then U-boot will continue. Or am I wrong?

 

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
serial_stm32 serial@40010000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19


U-Boot 2022.10-stm32mp-r2 (Aug 12 2024 - 23:20:26 +0200)

optee optee: OP-TEE: revision 3.19 (e413e2ec)
D/TC:0 tee_entry_exchange_capabilities:101 Asynchronous notifications are disabled
D/TC:0 tee_entry_exchange_capabilities:110 Dynamic shared memory is enabled
D/TC:0 0 core_mmu_xlat_table_alloc:526 xlat tables used 4 / 10
D/TC:? 0 tee_ta_init_pseudo_ta_session:296 Lookup pseudo TA 7011a688-ddde-4053-a5a9-7b3c4ddf13b8
D/TC:? 0 tee_ta_init_pseudo_ta_session:309 Open device.pta
D/TC:? 0 tee_ta_init_pseudo_ta_session:326 device.pta : 7011a688-ddde-4053-a5a9-7b3c4ddf13b8
D/TC:? 0 tee_ta_close_session:451 csess 0xde04a750 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
D/TC:? 0 tee_ta_init_pseudo_ta_session:296 Lookup pseudo TA 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_init_pseudo_ta_session:309 Open bsec.pta
D/TC:? 0 tee_ta_init_pseudo_ta_session:326 bsec.pta : 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_close_session:451 csess 0xde04a648 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_close_session:451 csess 0xde04a540 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_close_session:451 csess 0xde04a540 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
CPU: STM32MP151AAC Rev.Z
Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
Board: stm32mp1 in trusted mode (st,stm32mp151a-stm32-computer-firmware-mx)
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_close_session:451 csess 0xde04a540 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
DRAM: 512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 0 MHz
- DDR : 533 MHz
optee optee: OP-TEE: revision 3.19 (e413e2ec)
D/TC:0 tee_entry_exchange_capabilities:101 Asynchronous notifications are disabled
D/TC:0 tee_entry_exchange_capabilities:110 Dynamic shared memory is enabled
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA 7011a688-ddde-4053-a5a9-7b3c4ddf13b8
D/TC:? 0 tee_ta_close_session:451 csess 0xde04a540 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
Best answer by DMårt

@Erwan SZYMANSKI 

Hi! It seems that I have the same clock configuration. So this means it must be a bug?

Skärmklipp.PNG

Here is my device tree for Op-tee. Do you see something suspect? ;)

 

&rcc{
	pinctrl-names = "default";
	pinctrl-0 = <&rcc_pins_mx>;
	status = "okay";

	/* USER CODE BEGIN rcc */
	/* USER CODE END rcc */

	st,clksrc=<
		CLK_CKPER_DISABLED <------------
		CLK_ETH_PLL4P
		CLK_SDMMC12_PLL4P
		CLK_STGEN_HSE
		CLK_SPI2S23_PLL3Q
		CLK_I2C46_HSI
		CLK_USBO_USBPHY
		CLK_CEC_LSE
		CLK_I2C12_HSI
		CLK_UART24_HSI

 

After fix:

By the way! CubeMX will clean the whole U-boot-mx.dts file in the device tree when I'm generating new code. It's two bugs counted now! Try it your self. Create and STM32MP151AAC3 project and write something within BEGIN and END commands of the U-boot-mx.dts file inside the DeviceTree folder. Then generate. See if it's disappear.

 

U-Boot 2022.10-stm32mp-r2 (Aug 14 2024 - 00:19:35 +0200)

D/TC:? 0 tee_ta_init_pseudo_ta_session:296 Lookup pseudo TA 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_init_pseudo_ta_session:309 Open bsec.pta
D/TC:? 0 tee_ta_init_pseudo_ta_session:326 bsec.pta : 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_close_session:451 csess 0xde050378 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
CPU: STM32MP151AAC Rev.Z
Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
Board: stm32mp1 in trusted mode (st,stm32mp151a-stm32-computer-firmware-mx)
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA 94cf71ad-80e6-40b5-a7c6-3dc501eb2803
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
DRAM: 512 MiB
optee optee: OP-TEE: revision 3.19 (c9e2d42b)
D/TC:0 tee_entry_exchange_capabilities:101 Asynchronous notifications are disabled
D/TC:0 tee_entry_exchange_capabilities:110 Dynamic shared memory is enabled
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA 7011a688-ddde-4053-a5a9-7b3c4ddf13b8
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA a8cfe406-d4f5-4a2e-9f8d-a25dc754c099
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA a8cfe406-d4f5-4a2e-9f8d-a25dc754c099
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA a8cfe406-d4f5-4a2e-9f8d-a25dc754c099
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA a8cfe406-d4f5-4a2e-9f8d-a25dc754c099
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
Clocks:
- MPU : 650 MHz
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA a8cfe406-d4f5-4a2e-9f8d-a25dc754c099
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
- MCU : 208.878 MHz
- AXI : 266.500 MHz
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA a8cfe406-d4f5-4a2e-9f8d-a25dc754c099
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1
D/TC:? 0 tee_ta_close_session:470 Destroy session
- PER : 24 MHz
- DDR : 533 MHz
D/TC:? 0 tee_ta_init_session_with_context:549 Re-open TA a8cfe406-d4f5-4a2e-9f8d-a25dc754c099
D/TC:? 0 tee_ta_close_session:451 csess 0xde050270 id 1

 

1 reply

Erwan SZYMANSKI
Technical Moderator
August 13, 2024

Hello @DMårt ,
Yes this is peripheral clock, you can find related information in the Reference Manual (RCC chapter).

For the CubeMX configuration, you say that the PER clock is not inside, I am a bit surprised. Can you please double check, I can see this on my side (taken with the STM32MP157F-DK2 example project) :

ErwanSZYMANSKI_1-1723541621297.png

Kind regards,
Erwan.

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.
DMårtAuthor
Lead
August 13, 2024

@Erwan SZYMANSKI 

Oh, it's called CKPER clock. Intill check. I very sure it exists for MP151.

It might be the issue, i guess.

 

I will reply later.

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-ComputerSTM32MP257FAK3 custom board with STM64-OS as operating system: https://github.com/DanielMartensson/STM64-Computer