I2C3 In IMXRT106S is not working as master

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C3 In IMXRT106S is not working as master

602 Views
jnj
Contributor III

Hi All,

I want to configure I2C3 in imxrt106s as master for interfacing a fuel gauge.Following are the configurations I have given,

lpi2c_master_config_t masterConfig;


LPI2C_MasterGetDefaultConfig(&masterConfig);
masterConfig.enableDoze = true;
masterConfig.baudRate_Hz = 100000UL;

LPI2C_MasterInit(LPI2C3_PERIPHERAL, &masterConfig, LPI2C3_CLOCK_FREQ);

Default configurations

-------------------------------

masterConfig->enableMaster = true;
masterConfig->debugEnable = false;
masterConfig->enableDoze = true;
masterConfig->ignoreAck = false;
masterConfig->pinConfig = kLPI2C_2PinOpenDrain;
masterConfig->baudRate_Hz = 100000U;
masterConfig->busIdleTimeout_ns = 0U;
masterConfig->pinLowTimeout_ns = 0U;
masterConfig->sdaGlitchFilterWidth_ns = 0U;
masterConfig->sclGlitchFilterWidth_ns = 0U;
masterConfig->hostRequest.enable = false;
masterConfig->hostRequest.source = kLPI2C_HostRequestExternalPin;
masterConfig->hostRequest.polarity = kLPI2C_HostRequestPinActiveHigh;

After the initialisation I tried to read register values of fuel guage.But no activity is happening on I2C3. Always I2C3 SCL and SDA is held as high.Do we need to change any configurations? 

0 Kudos
Reply
1 Reply

581 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
Hope you are well.
Are you referring to an SDK example to communicate with your device? It is important to check that both pins SDA/SCL were configured correctly; you can check it with config tools.
The configuration should look like the one on this post: https://community.nxp.com/t5/i-MX-Processors/Strange-I2C-output/m-p/1450634

If you have more questions do not hesitate to ask me.
Best regards,
Omar

0 Kudos
Reply