Hello, I am trying to implement controls on a device connected to T5 and R5 on my MIMXRT1170 SoC.
Initially, I tried to set it up like so:
and I'll also add that we added a couple of 2.2k pullups.
Hi @alex0 ,
Thank you so much for your interest in our products and for using our community.
regarding your question, for the LPI2C6 communication issue on pins T5 and R5, please check the below:
1: Pin configuration: Configure both SCL and SDA with SION enabled and open drain enabled . Confirm that T5/GPIO_LPSR_11 is muxed to LPI2C6_SCL and R5/GPIO_LPSR_10 to LPI2C6_SDA. Also verify that the SCL and SDA input DAISY selections point to these pads, and check the pull-ups.
2: Debug interface: Confirm whether you are using SWD or JTAG. These pins(T5 and R5) also have JTAG functions. if JTAG is in use, please check for a pin-mux or board-level connection conflict.
3: Clock configuration: Confirm that the LPI2C6 functional clock is enabled and that the srcClockHz value passed to LPI2C_MasterInit() matches its configured frequency. LPI2C timing depends on that functional clock.
Please retry the transfer after these checks. If it still stops during the address byte, please share the SCL/SDA waveforms and the LPI2C6 MSR value captured after the failure.
Wish it helps you
Best Regards
May Liu
Minor correction, we are actually using JTAG, not SWD.
With JTAG disconnected and the configuration suggested by you (fast slew rate, normal drive strength, keeper select), we now get no clock.
Hello May, thank you for your quick response!
1. Regarding the pin configuration, I noticed that it differs slightly from what we had, but SION and open drain were enabled. Regardless, we tried to modify it to match the screenshot exactly - and it still did not work.
2. Regarding JTAG - we are aware of this. We are using SWD, but it seems that the default configuration works as is with no pin configurations.
3. Clock works as expected. The I2C is configured to run at 100khz and it runs at exactly that.
Below is how we configure the pads:
IOMUXC_SetPinMux(IOMUXC_GPIO_LPSR_10_LPI2C6_SDA,1U);
IOMUXC_SetPinMux(IOMUXC_GPIO_LPSR_11_LPI2C6_SCL, 1U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_LPSR_10_LPI2C6_SDA, 0x21U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_LPSR_11_LPI2C6_SCL, 0x21U);It is my understanding that IOMUXC_SetPinMux handles the input DAISY selections.
#define IOMUXC_GPIO_LPSR_10_LPI2C6_SDA 0x40C08028U, 0x2U, 0x40C08090U, 0x1U, 0x40C08068U
#define IOMUXC_GPIO_LPSR_11_LPI2C6_SCL 0x40C0802CU, 0x2U, 0x40C0808CU, 0x1U, 0x40C0806CUThis seems correct:
The MSR value we get after this is: 0x02000801