Part Number: MSPM0C1104
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.
Part Number: MSPM0C1104
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.
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
There is no mechanism to perform an I2C transaction without first sending the address (SLA) byte, since that is an integral part of I2C. [In case it needs to be said: Your code doesn't send the address byte, rather the I2C unit sends it automatically on your behalf.]
DM-R23-034 (v3) page 11 (and Sec 2.5) describes the transaction-level data your code sends. Each direction of the form "Write X to register A" is presumably a separate transaction.
The NACK is one level below that. The first things I would do: (1) check wiring (again) (2) check for sensor Vcc power (again).
Are you using the Murata Demo Kit? It's mentioned in the Appnote, but I haven't been able to find anything more about it. [A schematic would be useful.]
Dear BRuce ,
As discussed we are connecting 4.7K pull up on SDA,SCK pins. Also tested hardware connections with sensor.
The observation is
SCL SDA pulled up TRS3243: Driving 3.3V logic
No data transition on pins SCL SDA.
As per watch window MTXDATA is updated till forth byte even though we are trying to send more number of bytes.
Code is attached bellow.
We can not be able to debug
Please guide resolving\!
Regards
Seema Joshi
1) The scope trace above seems to show activity on SCL/SDA. (It was a NACK, but that counts as activity.) What were the test conditions there?
2) Is this the same code you posted earlier? It still contains requests for an OPT3001 (I2C address 0x44), which I understand you don't have.
3) Perhaps it would be useful for you to post your entire project, including the .syscfg file.
4) I don't see any transfers longer than 3 bytes. Under what conditions are you overflowing the FIFO?
Dear Bruce,
1.
2. yes! we are checking code by putting break point .
4 we tried calling the configurearget for more than 2 times ,I2C trasfer happens happen for 4 bytes after that trasfer gets stop.
we can not get the reason.
Since you're calling configureTarget with count=2, I don't see why it would send 4 bytes. Do you have a scope trace of a successful transaction?
It sounds as though the first two transactions succeed. What does the bus look like (on the scope) at the end of the second transaction?
You seem (again, their protocol is undocumented, so I'm guessing) to be setting register 0x00 to 0xA0, then to 0xF0. This does set the low bit to 0 (=Active) but it sets some reserved bits as well, which might annoy the target. Try just setting register 0x00 to 0x00.
Dear BRUCE
Attached is the reference code from Murrata.
Also attached is the code ,we are trying to work for I2C.Please review the trasitions on the Oscilloscope.
x-i2c_sensors_to_uart_LP_MSPM0C1104 (2).zip
There are pull up 4.7K on SCL SDA pins connected with Sensor.
Please help resolving issue with I2C .
Hi Seema,
This thread is becoming too long so I would recommend to open a new E2E about this topic. Please share the files in this new E2E as well. I would also want you to find specifically where in your code the I2C communications break.
Best Regards,
Diego Abad
Having some Murata sample code is a big step forward. As a practical matter I won't be able to look at it before next week.
From a distance the scope trace looks normal.
Dear Bruce,
Related to the Scope trace as per code , ,we shall see 90,00,A0,90,00,80 but actual trace shows 90,90 daly 90,90.
We are not able to debug I2C driver.
Please help!
The .zip file with the Murata sample code seems to have vanished ("Unfortunately, the page you've requested no longer exists."). Can you attach it again?
All the files (but not the file itself?) claim to be password-protected. Do you know the password(s)?
Are you fairly certain those transactions on the scope are configuration and not (subsequent) data fetches?
I adapted the target address and the first 4 configuration calls for use with an MPR121 (Adafruit breakout board), and they all run correctly. When I let the program run further, I saw a few 2-byte transactions (the data fetches) then the program stalled at line 200, specifically
while (DL_I2C_isControllerRXFIFOEmpty(I2C_0_INST))
;
while trying to read from the OPT3001 (which I don't have).
I suggest you remove the call at line 264, i.e. this one:
getMeasurementFromTarget(&gTxPacketLightMeasurement[0], I2C_TARGET_ADDRESS_OPT3001);
If it isn't getting in your way now, it soon will be.
Dear Bruce,
Thanks! You are right ,We are able to write the data on the I2C with Sensor.
Now for reading the status from sensor we need to read from Status register 04 of sensor @target address 48
As per the sample code the function
The register number is in gBuffer[0]. For the first call this is
uint8_t gTxPacketTemperatureMeasurement[I2C_TX_PACKET_SIZE_READING] = {0x00};
so to read register 04 instead you would use
uint8_t gTxPacketTemperatureMeasurement[I2C_TX_PACKET_SIZE_READING] = {0x04};I forgot to mention my findings regarding the Murata sample code:
1) the device is indeed a standard "register model" slave device with 1-byte register numbers. Repeated-start is not required for a read. (The TI sample doesn't do repeated-start, so that works out well.)
2) There are no sample register Values to speak of. Setting values are apparently received over the UART link, which is connected to what I suppose is a GUI or something.
3) The code goes to some trouble to prevent setting "reserved" bits in registers. I can't tell whether this is critical or just a "neatness" thing, but your code should probably avoid doing that (by e.g. not setting register 00 to 0xA0).