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.

[参考译文] TMS570LC4357:是否可以使用 Launchpad XL2开发板上 I2C1的两个引脚直接与其他 I2C 器件通信?

Guru**** 2472080 points
Other Parts Discussed in Thread: HALCOGEN

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1108569/tms570lc4357-is-it-possible-to-use-the-two-pins-of-i2c1-on-the-launchpad-xl2-development-board-to-communicate-directly-with-other-i2c-devices

器件型号:TMS570LC4357
主题中讨论的其他器件:HALCOGEN

大家好、

以下是客户提出的问题、可能需要您的帮助:

通过使用 LAUNCHXL2 570LC43开发板、客户尝试使用电路板上引出的 I2C1的两个引脚与其他电路板上的 I2C 器件进行通信。 下图中使用了 J2编号1 (GND) 8和9、分别连接到其他电路板上的 GND 和 I2C 引脚。

HALCoGen 配置如下:

客户在主函数中调用 i2cInit()函数并尝试与器件通信,但程序卡在 i2cIsMasterReady 或 i2cSendByte 函数中。 用示波器抓取了两个引脚、未看到任何波形。 它是否可以像这样直接连接?

您可以帮助检查此案例吗? 谢谢。

此致、

樱桃

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Cherry、

    1、I2C SCL 和 SDA 是否通过电阻器上拉? TMS570开发板的 I2C 线路上没有外部上拉电阻器。

    I2C SCL 和 SDA 线路都是"开漏"、因此 I2C 模块可以将 SCL 和 SDA 驱动为低电平、但不能将它们驱动为高电平。 为了使这两条线路能够变为高电平、您必须提供外部上拉电阻器。

    2、在 TMS570LC43x 器件上、I2C 信号与 MibSPI 信号复用、默认情况下、这些引脚用于 MibSPI。 您是否配置了引脚多路复用器?

      

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    感谢你的帮助。

    [引用 userid="45190" URL"~/support/microcontrollers/arm-based microcontrollers-group/arm -based-microcontrollers/f/arm -based-microcontrollers-forum/1108569/tms570lc4357-is-it-us可能 使用的 i2c-pins-on the -forum/11041066-sta-s-2656-is-ex-pads-unchdc-us#x4266-ex-pads-unchds-pads-pads-and-ex-c2c-24-pads-pads-pads-and-latest-latest-control-ex-ex-c41066-c41066-unch TMS570开发板的 I2C 线路上没有外部上拉电阻器。[/quot]

    要通信的从器件在电路板上有一个上拉电阻器、客户可以使用另一个开发板(已验证)直接与该器件通信。

    [引用 userid="45190" url="~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1108569/tms570lc4357-is-it-us可能 使用的 i2c-pins-ex-forum-forum/i2c41066-sp2#mi-dsp2#mi-s41062-sbspi-pine-exPin 默认情况下、与其他 i41066-sp2C-si-dspi-dspi-dsp2#mi-s4466-spi-pin 开发板上的 i410bspi-pinsp2#mi-pinsp2ds-multiplex-spi-pinspi-pin 您是否配置了 pinmux?

    之前未配置引脚多路复用器、关于引脚多路复用器、MibSPI 模块未在驱动器使能中启用、仅启用 I2C1、是否仍需要配置引脚多路复用器?

    此外,客户已按照您的响应配置 pinmux 并在程序中调用 muxInit()。 但是、仍然无法进行通信、并且 i2cIsMasterReady 仍无法返回。

    谢谢、此致、

    樱桃

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="496057" URL"~/support/microcontrollers/arm-based microcontrollers-group/arm -based-microcontrollers/f/arm based-microcontrollers-forum/1108569/tms570lc4357-is-it-us可能 使用的两个引脚 i2c1-on the -forumintrad/i4102cmpine-ex-intrads[不需要直接与其他器件进行通信、但 i2cm2-pintrab-ex-ex-intrab-ex-ex-intrab-ex-ines]、但仍支持 i4102cmpin-in-unch/277]

    是的、无论模块是否启用、都应配置引脚多路复用器。  

    [引用 userid="496057" URL"~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1108569/tms570lc4357-is-it-us可能 使用的两个引脚的 i2c1-on the -forum/i4102c-remasterpad/i2cmpad-rema-rema-unch2cmpot-unch2c2277]仍无法直接与其他器件通信且无法进行通信。

     在调用 i2cSendByte()后,您是否在 SCL 线路上看到时钟信号,在 SDA 线路上看到数据波形?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 QJ、

    客户在 HALCoGen 中配置了 PINMUX,是否需要在程序初始化期间调用 muxInit()?

    [引用 userid="45190" URL"~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1108569/tms570lc4357-is-it-us可能 使用的 i2c1-the-on the -line-exclock-line-exc41066-clock-line-texclock-exclock-trab-exclock-ine-exclock-ine-exc66]

    在 SCL 线上没有时钟信号、在 SDA 线上也没有看到数据波形。  

    谢谢、此致、

    樱桃

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 QJ、

    我是否可以知道是否有任何后续行动?

    谢谢、此致、

    樱桃

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="496057" URL"~/support/microcontrollers/arm-based microcontrollers-group/arm -based-microcontrollers/f/arm based-microcontrollers-forum/1108569/tms570lc4357-is-it-us可能 使用的两个引脚 i2c1-on the -example-program/unch510-intrab-ex-unchds-unchdlpad-ex-unch/example-region-sing-time4ds-unchdlpad-ines[在开发过程中需要与其他器件进行直接通信]

    muxInit() 在 HAL 代码的 systemInit()中调用。 客户不需要再次调用此函数。

    连接 I2C 从设备后、SCL 和 SDA 是否处于高电平? 否则、I2C 从板上的上拉电阻器将无法工作。  

    如果 SCL 和 SDA 被正确上拉、这两条线路应该为高电平、当你调用 i2CStart() API 时、I2C 模块将发出一个启动条件并发送从器件地址。