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.

[参考译文] BEAGLEBK:EEPROM 读写问题

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/667170/beaglebk-eeprom-read-and-write-issue

器件型号:BEAGLEBK

您好!

我必须使用/dev/i2c...nodes.对 EEPROM 进行读取和写入

我在下面的站点上看到 EEPROM 是通过 i2c-1访问的。 但 i2c 已禁用。

请帮助我在 SDK 中启用 i2c-1。

此致、

Vikas

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

    我正在使用 Beagle Bone Black 和 TISDK Argo 封装。


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

    大家好、Vikas、

    请参阅 帖子。

    此致、
    Kemal

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

    您好、 Kemal、

    i2c 已在 DTS 文件中启用。

                   pinmux_i2c0_pins{
                      pinctrl-single、pins =<0x188 0x30 0x18c 0x30>;
                      linux、phandle =<0x34>;
                      相位=<0x34>;
                   };

                   pinmux_i2c2_pins{
                      pinctrl-single、pins =<0x178 0x33 0x17c 0x33>;
                      linux、phandle =<0x38>;
                      相位=<0x38>;
                   };

    我能够读取 i2cget -y -f 0 0x50 0x00 EEPROM。

    但是、当我将 i2cset -y -f 0 0x50 0x00 0x00写入 EEPROM 时、值不会得到反映。

    请帮帮我。

    此致、

    Vikas

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

    使用 eeprog 命令对 EEPROM 进行编程。 i2cset 不能使用、因为它没有16位地址模式选择。
    root@AM335x-EVM:~# echo -n -e '\X69'| eeprog -f -16 /dev/i2c-0 0x50 -w 0x30
    root@AM335x-EVM:~# eeprog -XF -16 /dev/i2c-0 0x50 -r 48:1