No SCL/SDA Signals when using I2C Send as Master

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

No SCL/SDA Signals when using I2C Send as Master

Jump to solution
1,552 Views
phil_b
Contributor I

I have set up LPI2C1 as Master but get no outputs when attempting to send. I have pull-up resistors and the signals are connected to 1 slave device only. Please see below. What are some possible reasons for this problem?

philbylsma_0-1752593949580.png

 

philbylsma_1-1752594043418.png

Initialization:

/* set I2C1 interrupt */
IntCtrl_Ip_EnableIrq(LPI2C1_IRQn);
IntCtrl_Ip_InstallHandler(LPI2C1_IRQn, LPI2C1_Master_Slave_IRQHandler, NULL_PTR);

/* Init lpi2c in master mode */
Lpi2c_Ip_MasterInit(LPI2C_CHANNEL_0, &I2c_Lpi2cMasterChannel0);

Send data:

boolean I2C_read_fault_status(uint8 *rx_buffer)
{
TxBuff[0] = 0x78;
  if (LPI2C_IP_SUCCESS_STATUS == Lpi2c_Ip_MasterSendData(LPI2C_CHANNEL_0, (uint8 *)&TxBuff[0], 1U, FALSE))
{
LM5171_data_ptr = rx_buffer;
LM5171_data_len = 1;
return TRUE;
}

 

 

0 Kudos
Reply
1 Solution
1,527 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@phil_b

Could you tell us the part number you're using? Also, the RTD version is ?

If you're using S32K3, could you please try to set this bit and have a try again.

Senlent_0-1752647007483.png

 

 

View solution in original post

0 Kudos
Reply
4 Replies
1,528 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@phil_b

Could you tell us the part number you're using? Also, the RTD version is ?

If you're using S32K3, could you please try to set this bit and have a try again.

Senlent_0-1752647007483.png

 

 

0 Kudos
Reply
1,505 Views
phil_b
Contributor I
We are using the S32K324 part with the S32DS3.5 debugger and a Multilink FX Universal interface. Our RTD version is 4.00 HF02. There is not an option in the LPI2C peripheral to enable debugging (like there is in other peripherals). I did not think to set the option manually! When I set the DBGEN bit, the signals work as expected.
0 Kudos
Reply
1,536 Views
phil_b
Contributor I
The signals were missing while I was running in Debug mode. When I removed the debug connector, the signals were there! Is there a way to see the signals while in Debug mode?
0 Kudos
Reply
1,519 Views
db16122
Contributor III

What kind of debug mode you are using? specific debugger or on board debugger?

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2134322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ENo%20SCL%2FSDA%20Signals%20when%20using%20I2C%20Send%20as%20Master%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20set%20up%20LPI2C1%20as%20Master%20but%20get%20no%20outputs%20when%20attempting%20to%20send.%20I%20have%20pull-up%20resistors%20and%20the%20signals%20are%20connected%20to%201%20slave%20device%20only.%20Please%20see%20below.%20What%20are%20some%20possible%20reasons%20for%20this%20problem%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22philbylsma_0-1752593949580.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22philbylsma_0-1752593949580.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F347690iD0422A960D9707FE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22philbylsma_0-1752593949580.png%22%20alt%3D%22philbylsma_0-1752593949580.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22philbylsma_1-1752594043418.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22philbylsma_1-1752594043418.png%22%20style%3D%22width%3A%20398px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F347692i77FCE94B8D1D49AE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22philbylsma_1-1752594043418.png%22%20alt%3D%22philbylsma_1-1752594043418.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EInitialization%3A%3C%2FP%3E%3CP%3E%2F*%20set%20I2C1%20interrupt%20*%2F%3CBR%20%2F%3EIntCtrl_Ip_EnableIrq(LPI2C1_IRQn)%3B%3CBR%20%2F%3EIntCtrl_Ip_InstallHandler(LPI2C1_IRQn%2C%20LPI2C1_Master_Slave_IRQHandler%2C%20NULL_PTR)%3B%3C%2FP%3E%3CP%3E%2F*%20Init%20lpi2c%20in%20master%20mode%20*%2F%3CBR%20%2F%3ELpi2c_Ip_MasterInit(LPI2C_CHANNEL_0%2C%20%26amp%3BI2c_Lpi2cMasterChannel0)%3B%3C%2FP%3E%3CP%3ESend%20data%3A%3C%2FP%3E%3CDIV%3Eboolean%20I2C_read_fault_status(uint8%20*rx_buffer)%3C%2FDIV%3E%3CDIV%3E%7B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3ETxBuff%5B0%5D%20%3D%200x78%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20if%20(LPI2C_IP_SUCCESS_STATUS%20%3D%3D%20Lpi2c_Ip_MasterSendData(LPI2C_CHANNEL_0%2C%20(uint8%20*)%26amp%3BTxBuff%5B0%5D%2C%201U%2C%20FALSE))%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3ELM5171_data_ptr%20%3D%20rx_buffer%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3ELM5171_data_len%20%3D%201%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ereturn%20TRUE%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2135035%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20No%20SCL%2FSDA%20Signals%20when%20using%20I2C%20Send%20as%20Master%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2135035%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EWe%20are%20using%20the%20S32K324%20part%20with%20the%20S32DS3.5%20debugger%20and%20a%20Multilink%20FX%20Universal%20interface.%20Our%20RTD%20version%20is%204.00%20HF02.%20There%20is%20not%20an%20option%20in%20the%20LPI2C%20peripheral%20to%20enable%20debugging%20(like%20there%20is%20in%20other%20peripherals).%20I%20did%20not%20think%20to%20set%20the%20option%20manually!%20When%20I%20set%20the%20DBGEN%20bit%2C%20the%20signals%20work%20as%20expected.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2134623%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20No%20SCL%2FSDA%20Signals%20when%20using%20I2C%20Send%20as%20Master%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134623%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWhat%20kind%20of%20debug%20mode%20you%20are%20using%3F%20specific%20debugger%20or%20on%20board%20debugger%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2134554%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20No%20SCL%2FSDA%20Signals%20when%20using%20I2C%20Send%20as%20Master%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134554%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3Ephil_b%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ECould%20you%20tell%20us%20the%20part%20number%20you're%20using%3F%20Also%2C%20the%20RTD%20version%20is%20%3F%3C%2FP%3E%0A%3CP%3EIf%20you're%20using%20S32K3%2C%20could%20you%20please%20try%20to%20set%20this%20bit%20and%20have%20a%20try%20again.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_0-1752647007483.png%22%20style%3D%22width%3A%20682px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_0-1752647007483.png%22%20style%3D%22width%3A%20682px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F347781i61E6CD24AE10424A%2Fimage-dimensions%2F682x259%3Fv%3Dv2%22%20width%3D%22682%22%20height%3D%22259%22%20role%3D%22button%22%20title%3D%22Senlent_0-1752647007483.png%22%20alt%3D%22Senlent_0-1752647007483.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2134436%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20No%20SCL%2FSDA%20Signals%20when%20using%20I2C%20Send%20as%20Master%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134436%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EThe%20signals%20were%20missing%20while%20I%20was%20running%20in%20Debug%20mode.%20When%20I%20removed%20the%20debug%20connector%2C%20the%20signals%20were%20there!%20Is%20there%20a%20way%20to%20see%20the%20signals%20while%20in%20Debug%20mode%3F%3C%2FLINGO-BODY%3E