Other Parts Discussed in Thread: SYSCONFIG, , MSPM0C1106, OPT3001, HDC2010
We are trying bebug I2c as SCL remain high &SDA plled low,guess clock is not getting configured.
Please advise solution.
We are trying bebug I2c as SCL remain high &SDA plled low,guess clock is not getting configured.
Please advise solution.
Hi Seema,
What examples are you running in the SDK? You should be able to modify the FIFO trigger levels in SYSCONFIG as the example bellow.

Best Regards,
Diego Abad
Hi Diego ,
In the example code i2c_sensors_to_uart_LP_MSPM0C1104_nortos_ticlang default FIFO trigger levels set to 0 we tried setting the same to 6 as we want to transfer 6 bytes ,found transfer happens for 4 bytes only.
on the I2C pin SDA remain Low SCL High,no clock found.We have connected pull up resistors 2.2k on SCL SDA.
Please guide to start I2C.
Regards
Seema Joshi
Hi Seema,
I'll evaluate the example and let you know what I find out.
Best Regards,
Diego Abad
Hi Seema,
I tried the example from my side and it seems to be working fine. I tried with our SDK example with a 6 size message, and I was able to see an issue similar to your behavior. I believe you can use the following function to avoid this issue:
Dear Diego,
We found no transition on SCL,SDA output ,as we tried to monitor during function ,after the changes mentioned.
Hi Seema,
Just to confirm, which sensor device are you using? Can you share a capture of your I2C communications and a copy of your project? Finally, if you change back the size of the message to 4, does it make the example work?
Best Regards,
Diego Abad
As near as I can tell, the TX FIFO size on the C1104 is 4, not 8. Specifically: After initialization, I see that CFIFOSR:TXFIFOCNT=4, not 8.This is also the case for the MSPM0C1106.
This disagrees with TRM (SLAU893C) Sec 16.1.2 and Fig 16-1. It agrees with I2C_SYS_FENTRIES(=4) in mspm0c110x.h.
If you try to put 6 bytes into the TX FIFO, 2 of them will be lost, and the transaction (as you observe) will hang with SCL low, waiting for the CPU to provide 2 more bytes. If you need to send more than 4 bytes, you'll need a loop using DL_I2C_fillControllerTXFIFO() (as Diego has provided).
DeAr Diego,Bruce,
We are interfacing Murrata device IRS-D200ST00R1.
It is expected to send the 18 bytes (address (9)+ commands(9)) to configure the sensor.
Then send command status ,& read
Then read status write command ,read data .
Then data write address ,read data 2 times.
Please let us know shall we call "configureTarget" 4 times for 16 bytes & once for 2 bytes.?
We are trying to debug the example code i2c_sensors_to_uart.c found that code is stuck at line 206
Please guide on resolution.
Regards
Seema Joshi
Could you post the code you're working with now? In my copy, reaching that line implies that the transaction completed. (Perhaps the debugger is reporting the BKPT() that happens on an error?)
The Murata appnote (DM-R23-034 v3) doesn't really describe the protocol, but it seems to show a "register model" target, where the transactions could be fairly short.
That said, I expect Diego's function would work with any size (Tx) transaction, which could include both configuration and data-fetching.
Dear Bruce,
Thanks for the update.
With follwoing code we tried to send two bytes every time 9 times.expected to send 18 bytes.
We saw I2C0_MTXDATA register updates till 4th byte,as we placed the BKPY at delay_cycles(4800)
Also we saw there is no trasition on SCL,SDA pins.
Expect quick resolution.
> getMeasurementFromTarget(&gTxPacketLightMeasurement[0], I2C_TARGET_ADDRESS_OPT3001);
Do you also have an OPT3001 on board? If not, this will encounter a NACK, which will cause the program to stop at the BKPT() just before the delay_cycles call you mentioned.
I recommend you remove this line, as well as
I ran this code on my Launchpad. [I don't expect it to work properly, since I have neither your sensor nor an OPT3001.]
I see activity on both PA0 and PA11. I wonder if your pin assignments have been inadvertently changed.
Dear Bruce,
Please send the project file .There may be some settings related to the I2C Driver level are missing in our project.
We have checked and confirmed PA0,PA1/PA11 with sensor without sensor connection.(SCL is 2.2V & SDA is 0V)
Regards
Seema Joshi
I don't have the project with me right now.
I created it by importing the base Example, then pasting the code (above) over the (entire) .c file. I didn't touch anything else.
Do you know why SCL is at 2.2v rather than 3.3v? Maybe there's a clue there.
Dear Bruce,
In the launch pad there is 20 pin MCU we did not saw any trasition on SDA.
We have 8 pin MCU there we saw SDA pin trasitions but SCL pin remains low .
but in WATCH window we saw SCL pin status High.
We saw I2C Configuation window ,we can set the TX FIFO trigger level is settable upto 7 bytes.Please confirm TX buffer we shall send that many bytes ?
Regards
Seema Joshi
The project above (from the base example) uses PA0/PA11, matching the Launchpad. These pins have pullup jumpers (2.2k); I think you mentioned these, but just to make sure: Are these jumpers installed in your test case?
-----
In the 8-pin [per SLASF90C Table 6-1] I2C0 is on PA0/PA1. Notably, PA1 is shared with NRST. Do you have a reset circuit on your board? The Hardware Guide (SLAAEG4B) doesn't seem to mention this conflict, but in the Forum discussion over (here) it's suggested to deal with this case by leaving out the NRST circuitry and letting the I2C pullup do the NRST work.
[I'm still stuck on "Why is SCL=2.2V?"]
-----
I don't know why there's a discrepancy with the TRM regarding the TX FIFO size. I discovered this by using the debugger to write to TXDATA and watching TXFIFOCNT decrement. I also found (by accident) I2C_SYS_FENTRIES(=4) in mspm0c110x.h [though that's not where I would normally look]. There's also a comment (not elaborated) in the example i2c_controller_rw_multibyte_poll which says "This example uses FIFO with polling, and the maximum FIFO size is 4." so evidently someone knew about it.
That said: the TX FIFO trigger level (per se) isn't really relevant to this example, since it uses polling. DL_I2C_fillControllerTXFIFO() works by writing bytes until TXFIFOCNT=0, so it doesn't care (explicitly) how big the FIFO is.
NO ,We have tried connecting 2.2K 4.7K ,5.6K up to 10K
by diconneting jumpers on board.
Hardware
You are right there is pull up for reset 4.7K ,we tried connecting 4.7K ,2.2K.2k in parallel.
I don't know why there's a discrepancy with the TRM regarding the TX FIFO size. I discovered this by using the debugger to write to TXDATA and watching TXFIFOCNT decrement. I also found (by accident) I2C_SYS_FENTRIES(=4) in mspm0c110x.h [though that's not where I would normally look]. There's also a comment (not elaborated) in the example i2c_controller_rw_multibyte_poll which says "This example uses FIFO with polling, and the maximum FIFO size is 4." so evidently someone knew about it
We are trying sending 2 bytes each time with code I2C sensor to UART ,checked bytes trasmitted in watch window ,but on the pins transition not captured.
That said: the TX FIFO trigger level (per se) isn't really relevant to this example, since it uses polling. DL_I2C_fillControllerTXFIFO() works by writing bytes until TXFIFOCNT=0, so it doesn't care (explicitly) how big the FIFO is.
We saw FIFO register sends 4 bytes only maximum in polling mode.
Now latest update we observed that we captured 9 clocks & data with 4.7K pullup,we tried redusing <1K SCL SDA line drops to 0V.
If you ask me ,We need to be sure about hardware atleast i.e. pull up ,to try software or vice versa.
We are trying hardware software changes abruptly ,can not be able to conclude.
Hi Seema,
If the I2C lines are not working, it seems to me this is a problem with the sensor. I believe that the pull-up of 4.7k should be good enough. I would try a standalone example from the I2C examples and see if there is any way to send data to the sensor. If it is possible, then the next steps will be to do more commands until reaching the command that doesn't work.
Best Regards,
Diego Abad
If the I2C lines are not working, it seems to me this is a problem with the sensor.
Dear DIEgo,

With 4.7K pullup at SCL SDA we found trasition attached .We are not able to trace the follwoing function.
We need to disable write device address as sensor datasheet says to write 00x address and data.
Here I2C0_MTXDATA shows 4th byte send.
But on the scope we can capture only 90h as device address send.
The scope trace appears to show a NACK for address 0x48 (W). How is pin 5 (AD) connected?
OK. Pin5 for MCU is connected pull up 4.7K & connected to sensor.
Actually sensor datasheet says to write command & data instead of the address as first byte.
Can you please send the modified DL_I2C_startControllerTransfer without device address send as first byte.
If the sensor-side AD pin is connected to Vcc, the address is 0x49, not 0x48.
There's no mechanism to perform an I2C transaction without sending the target device address, since that's how I2C works.
I've only found the spec sheet (Web page) and appnote DM-R23-034 (v3), neither of which describes the protocol. DM-R23-034 describes the registers, implying it is a standard "register model" target (send register number byte followed by contents), but says nothing about commands. Do you have some other document(s)?
Dear Bruce,
As discussed "The scope trace appears to show a NACK " we have varified AD pin is connected to GND @device address 48 .flowchart for sensor device in
DM-R23-034 (v3) page 11 shows to start communication with 00,00.ButTI I2C driver DL_I2C_startController sends device address ?& tend data.
I am not sure that is why sensor is replying NACK.
Please let us know how to start driver without the device address.
Regards
Seema Joshi