cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot boot custom board based on STM32MP157F-DK2

Golgepapaz
Associate II

Hello

We've designed a custom board based on 157F-DK2 with device tree generated from the custom CubeMX project (included in case somebody like to review it.)

After flashing it in DFU mode with the image created from openstlinux sdk, TF-A bails out of boot with message

PANIC at PC : 0x2fff1de9
 
Exception mode=0x00000016 at: 0x2fff1de9

Now the troubleshooting guide says this probably stems from clock settings but our clock settings are similar to DK2. Interestingly if I flash the device with the official binary from SDK

I get

NOTICE:  CPU: STM32MP157FAC Rev.Z
NOTICE:  Model: STMicroelectronics STM32MP157F-DK2 Discovery Board
ERROR:   I2C device not ready
PANIC at PC : 0x2fff0467
 
Exception mode=0x00000016 at: 0x2fff0467

which means we are over the clock problems and there is a problem with communicating with PMIC judging by the BL code

	ret = stm32_i2c_init(i2c, &i2c_init);
	if (ret != 0) {
		ERROR("Cannot initialize I2C %x (%d)\n",
		      i2c->i2c_base_addr, ret);
		panic();
	}
 
	if (!stm32_i2c_is_device_ready(i2c, pmic_i2c_addr, 1,
				       I2C_TIMEOUT_BUSY_MS)) {
		ERROR("I2C device not ready\n");
		panic();
	}

So is the device tree generated by cubeMX is wrong or incompleteor should I go with default

DK2 device tree and add modificiations manually?

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Golgepapaz
Associate II

Thanks. We noticed We had one of the I2C pins wired differently than DK2 , We defined an alternative function from cubemx for the correct pin and the problem was solved. I'd forgotten this post since we already resolved it.

View solution in original post

3 REPLIES 3
Olivier GALLIEN
ST Employee

Hi @Golgepapaz​ ,

Sorry to come late in this thread ?

Where do you stand ?

For custom board you can't trust CubeMX generation since USER DEFINED section are not filled.

You have to compare your custom DTS with one for a DK2 board and node by node add the missing part.

You can find more details procedure and help in following articles :

How to bring up STM32MP1

FAQ : STM32MP1 - How to create a device tree adapted to your design with STM32CubeMx?

Olivier

Olivier GALLIEN
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.
PatrickF
ST Employee

@Golgepapaz​ 

devil is in the details, when you say "custom board based on 157F-DK2" there is likely few possible differences or mistakes you overlooked (as I guess you have done a custom board to tailor design to your needs).

Check that you use exactly same I2C pins than DK2 for communicating with STPMIC1A ?

Check I2C pull-ups and their associated supply.

Check that you use an oscillator for HSE as on DK2 (and not a crystal, which need DT update).

Regards,

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

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.
Golgepapaz
Associate II

Thanks. We noticed We had one of the I2C pins wired differently than DK2 , We defined an alternative function from cubemx for the correct pin and the problem was solved. I'd forgotten this post since we already resolved it.