cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed in configuring I2S supply voltage

ravichandra_t
Associate III

Hi,

Are there any references for configuring the I2S supply voltages in device trees for STM32MP135-DK.
From the I2S module currently we are getting the output level as 5V, is that expected or is there any way to change that from 5V to 3.3V.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ravichandra_t ,

could you please precise exactly on which STM32MP137F-DK connector/pins you are measuring 5V ? Did you refer your measurement to right 0V (VSS) ?

According to your DT, you are expecting to use PA4, PB0, PC0 and PC3 on CN8 respectively pins 12, 10, 8 and 13. 
VSS (0V) on pins 6, 14, 20, 30, 34, 9, 25 and 39.

It is not possible that those pins shows 5V as there is no 5V IOs supply on STPM32MP135F device.

They should be floating until initialized in the DT. Any error message when booting with updated DT ?
Maybe this page could help you to debug your SW setup: https://wiki.st.com/stm32mpu/wiki/Trace_and_debug_scenario_-_UART_issue

 

Regards,

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.

View solution in original post

6 REPLIES 6
PatrickF
ST Employee

Hi @ravichandra_t 

there is no 5V IOs on STM32MP135 device, could you please provide us more details on test conditions and on which pins are you seeing 5V ?
Maybe looking at board schematics (MB1635-DK-E02 Board schematic) could help you to understand the issue.

Regards

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.
ravichandra_t
Associate III

Hi @PatrickF ,

We are using STM32MP135-DK and we enabled SPI1/I2S1(Master-Half Duplex) to interface with external DAC. Please find the pinmux details below

i2s1_pins_mx: i2s1_mx-0 {
		pins {
			pinmux = <STM32_PINMUX('A', 4, AF5)>, /* I2S1_WS */
					 <STM32_PINMUX('B', 0, AF5)>, /* I2S1_MCK */
					 <STM32_PINMUX('C', 0, AF6)>, /* I2S1_SDO */
					 <STM32_PINMUX('C', 3, AF6)>; /* I2S1_CK */
			bias-disable;
			drive-push-pull;
			slew-rate = <1>;
		};
	};

	i2s1_sleep_pins_mx: i2s1_sleep_mx-0 {
		pins {
			pinmux = <STM32_PINMUX('A', 4, ANALOG)>, /* I2S1_WS */
					 <STM32_PINMUX('B', 0, ANALOG)>, /* I2S1_MCK */
					 <STM32_PINMUX('C', 0, ANALOG)>, /* I2S1_SDO */
					 <STM32_PINMUX('C', 3, ANALOG)>; /* I2S1_CK */
		};
	};

When we configure these pins as GPIO we are seeing the output level as 3.3V, but when we configure these pins as I2S pins we are seeing output level as 5V.

Hi @ravichandra_t 

I guess it is not the STM32MP135 device who present the 5V (I guess IOs are kept in high-z due to another issue in DT), but rather your external component who drive this 5V (pull-up to 5V on an external board ?)

You need first to get rid of this external 5V (even if IOs are 5V tolerant on some conditions, it is not recommended to use 5V digital signalling).

Then your DT might need to be tuned to have a correct I2S setup (e.g. missing status = "okay"; on i2s1 node, error messages, etc...).

Regards.

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.
ravichandra_t
Associate III

Hi @PatrickF ,

Even without connecting to the external board we are seeing 5V from those I2S1 Pins. We are not sure from where this 5V is being driven.
Please find the DT node of  I2S1 below.

&i2s1{
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&i2s1_pins_mx>;
	pinctrl-1 = <&i2s1_sleep_pins_mx>;	
	status = "okay";

	/* USER CODE BEGIN i2s1 */	
	#clock-cells = <0>;
    	clocks = <&rcc SPI1>, <&rcc SPI1_K>, <&scmi_clk CK_SCMI_PLL3_Q>, <&scmi_clk CK_SCMI_PLL3_R>;
    	clock-names = "pclk", "i2sclk", "x8k", "x11k";
    	#sound-dai-cells = <1>;
    	
    	i2s1_port: port {
        	#address-cells = <1>;
        	#size-cells = <0>;
		i2s1_endpoint: endpoint {
            	system-clock-frequency = <5644800>;
            	system-clock-direction-out;
            	frame-master;
            	bitclock-master;
		format = "i2s";
		mclk-fs = <256>;
            	remote-endpoint = <&codec_endpoint>;
		};
	};	
	/* USER CODE END i2s1 */
};

 From the STM32CubeMX tool we can't change any properties related to GPIO for I2S1(gpio mode, GPIO pull up/down)
Screenshot from 2023-07-31 12-09-50.png



Hi @ravichandra_t ,

could you please precise exactly on which STM32MP137F-DK connector/pins you are measuring 5V ? Did you refer your measurement to right 0V (VSS) ?

According to your DT, you are expecting to use PA4, PB0, PC0 and PC3 on CN8 respectively pins 12, 10, 8 and 13. 
VSS (0V) on pins 6, 14, 20, 30, 34, 9, 25 and 39.

It is not possible that those pins shows 5V as there is no 5V IOs supply on STPM32MP135F device.

They should be floating until initialized in the DT. Any error message when booting with updated DT ?
Maybe this page could help you to debug your SW setup: https://wiki.st.com/stm32mpu/wiki/Trace_and_debug_scenario_-_UART_issue

 

Regards,

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.

Hi @PatrickF ,

Thanks for your input on debugging steps. It helps me a lot analyze the different pin configuration details using debugfs.

In Pinctrl w.r.t I2S1 Configuration everything looks fine and we found some issue with the oscilloscope settings and we corrected those.Now we are able to see 3.3V.

Due to the ripples in the signal level, it was measuring the peak-to-peak voltage and we are seeing ~5V in those pins.

Thank you for helping us to analyze the Pin configuration details.