This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear Experts,
Currently, i am trying to read the data from msp430fr2433 through I2C with the CC1352 Sensor tag,
here i have used msp430fr243x_eusci_i2c_standard_slave.c example for MSP430fr2433 and i2c example in cc1352,
i have changed the slave address to 0x03,
i have shared a code snippet for your reference please check and let me know what i am doing wrong....
/* Create I2C for usage */
I2C_Params_init(&i2cParams);
i2cParams.bitRate = I2C_100kHz;
i2c= I2C_open(CONFIG_I2C_TMP, &i2cParams);
if (i2c == NULL)
{
Display_printf(display, 0, 0, "Error Initializing I2C\n");
while (1) {}
}
else
{
Display_printf(display, 0, 0, "I2C Initialized!\n");
}
/* Common I2C transaction setup */
i2cTransaction.writeBuf = txBuffer;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = rxBuffer;
i2cTransaction.readCount = 0;
/*
* Determine which I2C sensors are present by querying known I2C
* slave addresses.
*/
txBuffer[0] =0x00;
i2cTransaction.slaveAddress=MSP430;//HDC2080 ADDR;
i2cTransaction.writeBuf = txBuffer;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = rxBuffer;
i2cTransaction.readCount = 1;
if (I2C_transfer(i2c, &i2cTransaction))
{
Display_printf(display,0,0,"Detected I2C\r\n");
}
else
{
i2cErrorHandler(&i2cTransaction, display);
}
Regards
Surya
Hi Surya,
I am not sure I understand what the error is. Are you getting no answer from the MSP430?
Is the I2C_transfer function then blocking?
Let me know,
Regards,
Arthur
Hi Arthur
Yes, you are correct, the cc1352 clk pin doesn't work properly, it means i can't see any pulses in my DSO when i connect my msp430fr2433 with cc1352 if i remove the MSP from the cc1352 then clk pin generate pulses, i can't understand what happened there,
/* Create I2C for usage */ I2C_Params_init(&i2cParams); i2cParams.bitRate = I2C_100kHz; i2c= I2C_open(CONFIG_I2C_TMP, &i2cParams); if (i2c == NULL) { Display_printf(display, 0, 0, "Error Initializing I2C\n"); while (1) {} } else { Display_printf(display, 0, 0, "I2C Initialized!\n"); } /* * Determine which I2C sensors are present by querying known I2C * slave addresses. */ txBuffer[0] =0x00; i2cTransaction.slaveAddress=MSP430;//HDC2080 ADDR; i2cTransaction.writeBuf = txBuffer; i2cTransaction.writeCount = 1; i2cTransaction.readBuf = rxBuffer; i2cTransaction.readCount = 0; if (I2C_transfer(i2c, &i2cTransaction)) { Display_printf(display,0,0,"Detected I2C\r\n"); } else { i2cErrorHandler(&i2cTransaction, display); }
i am getting "I2C Initialized" only in my serial log .
Regards
Surya
Hi Surya,
According to what you are saying, it could a line pull-up issue.
What are the idle levels of SDA and SCL on the MSP430 and the CC1352 when enabled?
I am suspecting that the pull-up might be too strong on the MSP430, or it may be configured wrong.
Regards,
Arthur
Hi Arthur R☑️
Sorry for the late reply, i have tested with CC152P1 launch pad that is working fine but i am getting no response when i tried with CC1352R1claunch pad.
Both are having the same pullup resistor 3.3k in I2C line.
please help to find my mistakes...
regards
Surya
Hi Surya,
This is expected, if you are still using DIO4 on the CC1352R, as it does not exist on the CC1352P (instead, it is a crystal pin).
CC1352R
CC1352P
Please use a different set of DIOs, like DIO_8 and DIO_9 instead.
Regards,
Arthur
Hi Arthur R☑️
Thanks for your quick response,
Sorry i can't get you...
this is i configured in syscfg
CC1352P- working fine with MSP
SCL- Any(DIO21/9 (BAS Sensors Mark II I2C))
SDA- Any(DIO5/10 (BAS Sensors Mark II I2C))
CC1352R- Not working with MSP
SCL- Any(DIO4/9 (BAS Sensors Mark II I2C))
SDA- Any(DIO5/10 (BAS Sensors Mark II I2C))
Please let me know, if i made any mistakes...
regards
Surya
Hi Surya,
On LPSTK-CC1352R, there are two sensors already connected to the I2C pins that you are using (DIO4,DIO5):
In order to isolate the issue, could you instead use DIO3 for SDA, and DIO22 for SCL?
Regards,
Arthur
Hi Arthur R☑️
Yes you are correct, but i have tested the same code with CC1352R launch pad but that is not working, anyway i will follow your suggestion and let you know the result...
regards
Surya
Hi Arthur R☑️
As per your reference i have changed the pin but no luck!!!
Here i have found another strange problem...
CC1352-P1 is only working with V5.30 SDK versions only.... if i test with newer version i am getting failed response only
I2C Initialized!
I2C slave address 0xa not acknowledged!
I2C slave address 0x49 not acknowledged!
I2C slave address 0x48 not acknowledged!
Failed to detect a sensor!
working response
I2C Initialized!
Detected TMP006 sensor with slave address 0xa
I2C slave address 0x49 not acknowledged!
I2C slave address 0x48 not acknowledged!
Using last known sensor for samples.
I2C data byte not acknowledged!
Sample 1: 15 16
Sample 2: 65 66 66
I2C closed!
regards
Surya
Hi Surya,
It seems like it could be related to that other issue: https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1279599/cc1352r-i2c_open-and-i2c_close-functions-generate-again-glitches-in-the-latest-sdk---7-10
Are you saying that even with 5.30 SDK, you cannot communicate with the MSP430, or is it working? For both CC1352R and CC1352p?
Regards,
Arthur
Hi Arthur R☑️
1. CC1352P1 is working with 5.30SDK
2. CC1352R1- is not working with 5.30SDK
3.CC1352R1 and P1 is not working with SDK 6.30
regards
Surya
Hi Surya,
Do you have any mean of capturing the I2C signal for each case, with an oscilloscope or a logic analyzer for instance?
Regards,
Arthur