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.

[参考译文] TM4C1294NCPDT:如何使用 I2C 持续发送2个字节的数据

Guru**** 2529790 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1336179/tm4c1294ncpdt-how-to-use-i2c-to-continuously-transmit-2-bytes-of-data

器件型号:TM4C1294NCPDT

您好、专家:

请告诉我 I2C 的用法。 当前使用的 SDK 版本是"TivaWare_C_Series-2.2.0.295"。

客户需要能够通过 I2C 连续传输2个字节的数据。 目前、仅找到了"HUMIDITY_sht21"的示例。

使用 I2C_MASTER_CMD_SINGLE_SEND 方法、该方法只能传输一个字节的数据。

客户参阅"在 TM4C129x 上使用 I2C 主器件的功能集"、

在 I2C_MASTER_CMD_BURST_SEND_START 和 I2C_MASTER_CMD_BURST_SEND_FINISH 内部、

该方法实现了2字节的数据传输。

但会出现一个奇怪的问题、

有时、只传输1个字节的数据、而不传输另一个字节(如下所示)。

以下是客户的代码。 我想问一下、这是不是客户如何使用它?

如果您可以参考一些示例、请提供它们。

谢谢

丹尼尔