Other Parts Discussed in Thread: C2000WARE, TMS320F28379D
Thanks in advance for the help.
I've loaded the C2000Ware "i2c_ex3_external_loopback" example into CCS7 and uploaded it to the LaunchXL-F28379D hardware.
The example code expects to use GPIO32 & 33 for I2CA and 34 & 35 for I2CB, but the LaunchXL-F28379D hardware doesn't expose all of those pins. As a work-around, I used GPIO104 & 105 for I2CA and 40 & 41 for I2CB.
Here's the init code changes:
//
// Initialize GPIOs 32 and 33 for use as SDA A and SCL A respectively
//
/* GPIO_setPinConfig(GPIO_32_SDAA);
GPIO_setPadConfig(32, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(32, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(GPIO_33_SCLA);
GPIO_setPadConfig(33, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(33, GPIO_QUAL_ASYNC);
*/
GPIO_setPinConfig(GPIO_104_SDAA);
GPIO_setPadConfig(104, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(104, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(GPIO_105_SCLA);
GPIO_setPadConfig(105, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(105, GPIO_QUAL_ASYNC);
//
// Initialize GPIOs 34 and 35 for use as SDA B and SCL B respectively
//
/* GPIO_setPinConfig(GPIO_34_SDAB);
GPIO_setPadConfig(34, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(34, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(GPIO_35_SCLB);
GPIO_setPadConfig(35, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(35, GPIO_QUAL_ASYNC);
*/
GPIO_setPinConfig(GPIO_40_SDAB);
GPIO_setPadConfig(40, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(40, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(GPIO_41_SCLB);
GPIO_setPadConfig(41, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(41, GPIO_QUAL_ASYNC);
Next, it seems the documentation for the LaunchXL-F28379D (VER:1.1) reverses the pins on J5 where GPIO40 & 41 connect. The graphic in the "Meet the TMS320F28379D LaunchPad Development Kit" brochure shows "P41" at J5-49 and "P40" at J5-50. However, when I trace the circuit out using the Gerber files in C2000Ware R1.1, the reverse is true. P40 connects to J5-49 & P41 to J5-50. As a result, instead of connecting "SCLA (GPIO33) to SCLB (GPIO35)" etc., I connected SCLA (GPIO105) to SCLB (GPIO41) etc. (I found this while troubleshooting, because it wasn't working when connected the other way.)
OK, now that that's out of the way, when I run the code, I see the slave being addressed on the I2C bus followed immediately by a NACK. Nothing further happens.
The RXFFINT flag never gets set. RXFFIENA enable bit is set. I've confirmed the slave address is set to 0x3C.
It seems like the data never gets into the receive buffer of I2CB.
Question #1: Where in the code is it sending the slave address?
Question #2: Where in the code is it sending the NACK?
Question #3: Do I have the I2C module configured appropriately?
Further, the codes runs long enough to increment the send array (sData) to 2,3, and then it enters the while loop, never to hear from the I2C module again. rDataPoint never changes from 0.
I appreciate any help you can give.


