Skip to content

NXP RT1061 - Zephyr shell "i2c scan" hangs #104689

@ofirshe

Description

@ofirshe

Describe the bug

Hi,

When running the Zephyr shell i2c scan command, scanning lpi2c4 hangs. I attached a debugger and it appears to hang in the i2c shell scan implementation at:
https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/i2c/i2c_shell.c#L79

All other I2C buses scan successfully; only this bus hangs (no output after printing the header).

Devicetree snippet used for lpi2c4 pinmux + enable:

pinmux_lpi2c4: pinmux_lpi2c4 {
	group0 {
		pinmux = <&iomuxc_gpio_ad_b0_12_lpi2c4_scl>,
			<&iomuxc_gpio_ad_b0_13_lpi2c4_sda>;
		drive-strength = "r0-6";
		drive-open-drain;
		slew-rate = "slow";
		nxp,speed = "100-mhz";
		input-enable;
	};
};

&lpi2c4 {
    status = "okay";
	pinctrl-0 = <&pinmux_lpi2c4>;
	pinctrl-names = "default";
};

Shell output:

xsl_bsp_shell:~$ i2c scan i2c@403f0000
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:             -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- 23 -- -- -- -- -- -- -- -- -- -- -- 2f
30: -- 31 32 33 34 35 -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
9 devices found on i2c@403f0000
xsl_bsp_shell:~$ i2c scan i2c@403f4000
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:             -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- 52 -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- 72 73 -- -- -- --
5 devices found on i2c@403f4000
xsl_bsp_shell:~$ i2c scan i2c@403f8000
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:             -- -- -- -- -- -- -- -- -- -- -- --
10: -- 11 -- 13 -- 15 -- 17 -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- 31 -- 33 -- 35 -- 37 -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- 49 -- 4b -- 4d -- 4f
50: -- 51 -- 53 -- 55 -- 57 -- 59 -- 5b -- 5d -- 5f
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
20 devices found on i2c@403f8000
xsl_bsp_shell:~$ i2c scan i2c@403fc000
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:

Regression

  • This is a regression.

Steps to reproduce

No response

Relevant log output

Impact

Functional Limitation – Some features not working as expected, but system usable.

Environment

Zephyr SDK 0.17.4
Zephyr 4.3

Additional Context

No response

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions