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.

[参考译文] PROCESSOR-SDK-AM335X:ADC 缓冲区启用失败

Guru**** 2595805 points


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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/647608/processor-sdk-am335x-adc-buffer-enable-fails

器件型号:PROCESSOR-SDK-AM335X

为了在 AM3354BZCZ80中启用连续模式 ADC 、我尝试执行以下操作

echo 1 >/sys/bus/iio/devices/iio:device0/scan_elements/in_voltage7_en

echo 100 >/sys/bus/iio/devices/iio \:device0/缓冲区/长度

echo 1 >/sys/bus/iio/devices/iio \:device0/缓冲器/启用


但由于   缓冲区未启动、缓冲区参数更新失败、第三条命令抛出错误(-22)

 

如何解决此误差? 包含的驱动程序是 TI 的 AM335X ADC 驱动程序

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您使用的 Linux 版本是什么? ADC 配置是否正确? 有关详细信息、请参阅 processors.wiki.ti.com/.../Linux_Core_ADC_Users_Guide。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

     Linux 版本:3.12.30-AM335x-PD15.2.2

    ADC 根据 http://processors.wiki.ti.com/index.php/Linux_Core_ADC_Users_Guide 进行配置 

    在一次性模式下、我们能够读取通道值。 但在连续模式下、会出现此问题。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我没有做任何事情。 但现在我遇到了一个错误: -sh:echo:write error:invalid arge.
    !!

    它能够写入0、但无法写入1。

    echo 1 >/sys/bus/iio/devices/iio \:device0/buffer/enable -->此命令将错误设置为-sh:echo:write error:invalid arge.

    但是、

    echo 0 >/sys/bus/iio/devices/iio \:device0/buffer/enable 不会抛出任何错误。 为什么会发生这种情况?
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您使用的 Linux 版本非常旧、可能无法完全支持缓冲区功能。 ADC wiki 信息对 Linux 处理器 SDK 有效: www.ti.com/.../PROCESSOR-SDK-AM335X