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.

DLPC3478: 对I2C进行读写,在写入数据后,一直没有发送停止位

Part Number: DLPC3478


在写代码过程中发现无法读取数据,对I2C信号进行抓取后发现在数据  写入后一直没有发送停止位,我调用的是“CyUSBSerial.h”中给出的接口,将停止位进行使能,但是不知为何没有发送停止位,时钟处于下拉状态

  • 直接用TI的sample代码(不编译)有问题吗?

    1>------ Build started: Project: dlpc347x, Configuration: Debug Win32 ------
    1>dlpc34xx.c
    1>dlpc347x_internal_patterns.c
    1>dlpc_common.c
    1>cypress_i2c.c
    1>dlpc347x_samples.c
    1>Generating Code...
    1>dlpc347x.vcxproj -> C:\DLP_Products\DLPC3478\ti.com\DLPC-API-1.10_TIDLP\build\vs2017\Debug\dlpc347x.exe
    1>C:\DLP_Products\DLPC3478\ti.com\DLPC-API-1.10_TIDLP\build\vs2017\dlpc347x\..\..\..\third_party\cyusbserial\cyusbserial.dll

  • 我是使用qt,关于I2C读写是调用TI sample的代码,但是不知道为什么不发送停止位,之前使用cy7 x86库的时候,在读写过程中地址一直错误,后面换成x64的库,发现不发送停止位

  • cy7 x86库这个没有问题的,现在客户基本用32位的。请基于这个调试好。

  • x64的库有问题吗?我目前是基于x64的库调试,代码是只能基于vs编译吗?我昨天有用VS编译TI sample的源代码,可以正常读写,但qt上面无法正常读写

  • TI测试的是基于VS的,

    QT从理论上肯定行,但是需要调试和测试。

    我的意识是一步一步来。

    请把QT的完整projectfile贴出来一起调试,或者您按照I2C协议调试,咨询一下在QT forum:

    Qt in Visual Studio: A New Approach Based on MSBuild

  • 我使用VS将TI sample的代码进行封库,在VS上新建一个工程测试,链接这个库,发现无法读写,请问这种问题有什么解决的办法吗?

  • 我们直接测试这个是没有问题的,您使用VS进一步封装出现问题,可能是VS兼容性问题,请联系Microsoft工程师比较熟悉。

    1>------ Build started: Project: dlpc347x, Configuration: Debug Win32 ------
    1>dlpc34xx.c
    1>dlpc347x_internal_patterns.c
    1>dlpc_common.c
    1>cypress_i2c.c
    1>dlpc347x_samples.c
    1>Generating Code...
    1>dlpc347x.vcxproj -> C:\DLP_Products\DLPC3478\ti.com\DLPC-API-1.10_TIDLP\build\vs2017\Debug\dlpc347x.exe
    1>C:\DLP_Products\DLPC3478\ti.com\DLPC-API-1.10_TIDLP\build\vs2017\dlpc347x\..\..\..\third_party\cyusbserial\cyusbserial.dll