Skip to main content
Associate III
November 28, 2023
Solved

STPM4RasPI for STM32MP135F-DK - SPI timeout error

  • November 28, 2023
  • 2 replies
  • 2362 views

Hi,

 

I would like to integrate the STPM4RasPI with MP135F-dk. After following the https://wiki.st.com/stm32mpu/wiki/STPM4RasPI_expansion_board tutorial, I am receiving an error. 

jschneider_1-1701174477269.png

Driver is enabled:

jschneider_0-1701175073672.png

STPM4RasPI module is properly attached. 

Do you have any possible solutions?

 

Best,

Jacek

This topic has been closed for replies.
Best answer by jschneider

Hi @Olivier GALLIEN ,

 

Instruction given in https://wiki.st.com/stm32mpu/wiki/X-LINUX-TPM_expansion_package was helpful. I had to adjust arch/arm/boot/dts/stm32mp135f-dk.dts as:

&spi5{
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&spi5_pins_a>;
	pinctrl-1 = <&spi5_sleep_pins_a>;
	cs-gpios = <&gpioh 11 0>;
	status = "okay";

	st33htpm0: st33htpm@0{
		status="okay";
		compatible = "st,st33htpm-spi";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>; /* CS #0 */
		spi-max-frequency = <10000000>;
	};
}; 

And then the module was successfully detected.

Going back into the https://wiki.st.com/stm32mpu/wiki/STPM4RasPI_expansion_board there is a significant difference in configuration:

&spi5{
	cs-gpios = <&gpioh 11 0>;
	status = "okay";

	st33htpm0: st33htpm@0{
		status="okay";
		compatible = "st,st33htpm-spi";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>; /* CS #0 */
		spi-max-frequency = <10000000>;
		};
}; 

 It is wrong and should be changed.

 

Best,

Jacek

2 replies

Olivier GALLIEN
Technical Moderator
November 28, 2023

Hi @jschneider 

,

Please confirm you are on top of release V5. 

For this last release you may also try https://wiki.st.com/stm32mpu/wiki/X-LINUX-TPM_expansion_package which have been validated on DK 135F. 

Cross-checking both article and solution may help to find the missing piece

 

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.
jschneiderAuthorBest answer
Associate III
November 29, 2023

Hi @Olivier GALLIEN ,

 

Instruction given in https://wiki.st.com/stm32mpu/wiki/X-LINUX-TPM_expansion_package was helpful. I had to adjust arch/arm/boot/dts/stm32mp135f-dk.dts as:

&spi5{
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&spi5_pins_a>;
	pinctrl-1 = <&spi5_sleep_pins_a>;
	cs-gpios = <&gpioh 11 0>;
	status = "okay";

	st33htpm0: st33htpm@0{
		status="okay";
		compatible = "st,st33htpm-spi";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>; /* CS #0 */
		spi-max-frequency = <10000000>;
	};
}; 

And then the module was successfully detected.

Going back into the https://wiki.st.com/stm32mpu/wiki/STPM4RasPI_expansion_board there is a significant difference in configuration:

&spi5{
	cs-gpios = <&gpioh 11 0>;
	status = "okay";

	st33htpm0: st33htpm@0{
		status="okay";
		compatible = "st,st33htpm-spi";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>; /* CS #0 */
		spi-max-frequency = <10000000>;
		};
}; 

 It is wrong and should be changed.

 

Best,

Jacek

Olivier GALLIEN
Technical Moderator
November 28, 2023

Hi @jschneider 

 

I also add a big warning : any wrong side connection of the TPM to RasPI connector likely lead to kill the TPM. ( high probability) 

 

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.