Hi,
I've been developing an application that is based on Project Zero for the CC2650 LaunchPad for quite a while now, and I was hoping that I could add an LCD display to the project. The LCD display that I picked out uses I2C for communication, so I've been attempting to add the I2C driver that is available through TI-RTOS. I have been following the steps suggested on the TI-RTOS I2C driver reference page (here).
The implementation seems to be almost identical to the SPI driver, which I was able to successfully add to my project not too long ago, but for some reason, the I2C driver is just not working for me. I have included the necessary header files (I2C.h and I2CC26XX.h) at the top of my ProjectZero.c file. I have also created data structures I2C_Handle, I2C_Params, and I2C_Transactions at the top of my ProjectZero.c file, where all other variables are defined, and I have created transmit and receive buffers for the I2C_Transaction data structure in this same location. I then call I2C_Params_Init() and pass it a pointer to my I2C_Params data structure. I then include the I2C_init() function. If I compile the code at this point, without actually specifying any I2C transactions, I receive no errors. If I upload it to the CC2650, the MCU functions normally.
The trouble comes when I try to use the I2C_open(), I2C_transfer(), and I2C_Close() functions. I include them in my program, and the program compiles without errors. But when I program the CC2650, it locks up completely. I see no output to the console (I'm utilizing the UART logging option for Project Zero). At first, I thought it was just the application that got tied up (possibly because I'm using I2C in blocking mode), but I soon noticed that the CC2650 is also not advertising during this time, which tells me that the problem probably extends beyond the application.
Is there something that I am missing when I try to use the I2C driver in Project Zero? I'm wondering if this is a case where I need to change a configuration file or modify the stack in some way before I2C drivers can be utilized. Because I lose all MCU functionality, I have not been able to debug and attempt to find a reason for the problems that I'm having.
If anyone could point me in the right direction, I would really appreciate it! If anything is unclear or you need more information, let me know and I will gladly provide. Thank you!