]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blobdiff - packages/ti/drv/i2c/test/eeprom_read/src/main_test.c
[Bug Fix]Fixed issue with I2C tests failing on Main Domain R5 Cores
[processor-sdk/pdk.git] / packages / ti / drv / i2c / test / eeprom_read / src / main_test.c
index a9d88c3d99d1ddc0f27bcdcdc6a3e010d68ebd9e..c4c272aa8ca3f1aa2f91547ae7692bd03946219c 100755 (executable)
@@ -78,7 +78,9 @@
 #include <ti/drv/sciclient/sciclient.h>
 #endif
 
+#if defined (BUILD_C7X_1)
 #include <ti/csl/csl_clec.h>
+#endif
 
 #include <ti/csl/arch/r5/csl_arm_r5.h>
 
@@ -223,7 +225,14 @@ bool Board_initI2C(void)
          * Pulsar R5 core is on the Main domain, use the Main Pulsar
          * interrupt router
          */
-        i2c_cfg.intNum = I2C_INST_WKUP_I2C0_INT_NUM_MAIN;
+        if(info.cpuID == 0U)
+        {
+            i2c_cfg.intNum = I2C_INST_WKUP_I2C0_INT_NUM_MAIN;
+        }
+        else
+        {
+            i2c_cfg.intNum = I2C_INST_WKUP_I2C0_INT_NUM_MAIN + 128U;
+        }
     }
     else
     {