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.
Part Number: CC2650EM-7ID-RD
I'm trying to implement SW I2C function via GPIOs.
Actually I can control IOs as I expected but have problem when I read IO.
1) I2C CLK output is working well
2) I2C SDA output is working well
3) when I configure SDA pin to input, need to read data from slave via SDA, I couldn't get correct data...usually it reads zero even though there is coming data
4) GPIO configuration is like as below
(1) PIN_init() : configures IOs
(2) PIN_open() : open pins which are initialized at PIN_init()
(3) output SCK and SDA
(4) configure SDA port to input via "PIN_setConfig(sw_i2cPinHandle, PIN_BM_INPUT_EN, SW_I2C2_SDA_Pin);"
(5) and read pin like as "val = PIN_getInputValue( SW_I2C2_SDA_Pin);"
(6) and configure to output again, PIN_setConfig(sw_i2cPinHandle, PIN_BM_GPIO_OUTPUT_EN, SW_I2C2_SDA_Pin);
5) I couldn't read data correctly from this procedure and after this, I couldn't control SDA output even I can control SCK
6) I'm not sure whether I can control GPIOs in/out successively
Could someone let me know how I can handle this?
// Switch from input to output.
// This does not touch buffer, drive strength, IRQ configuration.
PIN_Config configMask = PIN_BM_INPUT_MODE | PIN_BM_GPIO_OUTPUT_EN;
PIN_Config newConfig = SW_I2C2_SDA_Pin | PIN_INPUT_DIS | PIN_GPIO_OUTPUT_EN;
PIN_Status result = PIN_setConfig(sw_i2cPinHandle, configMask, newConfig);
assert(result == PIN_SUCCESS);
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.