AnsweredAssumed Answered

Alternate function woes...

Question asked by Mike Moretti on Feb 20, 2020
Latest reply on Feb 25, 2020 by Mike Moretti

So, I took an example project, lpi2c_polling_b2b_master and built and flashed it.  If I connect a logic analyzer on the LPI2C1 SDA/SCL lines, I see proper signals/data coming out.  However, if I change out LPI2C1 for LPI2C3 on GPIO_SD_B0_00/01, I get  SCL always high, and SDA always low (and in case you're wondering, I tried this on two different boards, the EVK using an SD card breakout to access the pins, and a board from Embedded Artists using their test points for these pins).  I've been wrangling with this for 2 days now trying to figure out the proper pin mux settings (and also found that the config tool doesn't set DAISY at all nor SION properly based on all the googling I've done and docs I've read).  Here are the changes I made:

 

lpi2c_polling_b2b_master.c:

#define EXAMPLE_I2C_MASTER_BASE (LPI2C3_BASE)

 

pin_mux.c:

 

IOMUXC_SetPinMux(
      IOMUXC_GPIO_SD_B0_01_LPI2C3_SDA,        /* GPIO_AD_B1_00 is configured as LPI2C1_SCL */
      1U);                                    /* Software Input On Field: Force input path of pad GPIO_AD_B1_00 */
IOMUXC_SetPinMux(
      IOMUXC_GPIO_SD_B0_01_LPI2C3_SDA,        /* GPIO_AD_B1_01 is configured as LPI2C1_SDA */
      1U);                                    /* Software Input On Field: Force input path of pad GPIO_AD_B1_01 */

IOMUXC->SELECT_INPUT[kIOMUXC_LPI2C3_SDA_SELECT_INPUT] = 0b01; // see refman
IOMUXC->SELECT_INPUT[kIOMUXC_LPI2C3_SCL_SELECT_INPUT] = 0b01; // see refman

IOMUXC_SetPinConfig(
      IOMUXC_GPIO_SD_B0_00_LPI2C3_SCL,        /* GPIO_AD_B1_00 PAD functional properties : */ // d8b0
      0xd8b0);
IOMUXC_SetPinConfig(
      IOMUXC_GPIO_SD_B0_00_LPI2C3_SCL,        /* GPIO_AD_B1_01 PAD functional properties : */ // d8b0
      0xd8b0);

 

These are the only changes I made (and the only places I could find any reference to LPI2C in the example code).  What am I doing wrong?

 

Thanks,

-m

Outcomes