element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Atmel Xplained Boards
  • Products
  • Dev Tools
  • Atmel Xplained Boards
  • More
  • Cancel
Atmel Xplained Boards
Forum SAMA5D4 ADC driver - do you know a Linux image that has the driver?
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Atmel Xplained Boards requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 11 replies
  • Answers 1 answer
  • Subscribers 4 subscribers
  • Views 458 views
  • Users 0 members are here
Related

SAMA5D4 ADC driver - do you know a Linux image that has the driver?

Jan Cumps
Jan Cumps over 6 years ago

For the Enchanted Objects Design ChallengeI'm trying to get the ADC Hardware Trigger mechanism working.


I have difficulties with the ADC driver. I am unsure if the 4.7 and 4.6 linux Yocto Poky images have that driver installed.


I have 3 questions :


Is the ADC driver for the sama5d4 included in those Yocto Poky images?

If yes, what's the name of the driver (is it at91_adc)?

If no, is there an image around with the ADC included, or is there a way to get the driver installed on my board running that Yocto Poky image?

 

Here's the blog post that shows what I'm dong: Review 9b: Atmel SMART SAMA5D4 Xplained Ultra - Set up ADC Buffer with Hardware Trigger Part 2

 

I have issues when the buffer read tool generic_buffer tries to load the driver:

 

Here's where the code fails:

 

    /* Find the device requested */  
    dev_num = find_type_by_name(device_name, "device");  
    if (dev_num < 0) {  
        printf("Failed to find the %s\n", device_name);  
        ret = -ENODEV;  
        goto error_ret;  
    }  
    printf("iio device number being used is %d\n", dev_num); 

 

Error

Failed to find the at91_adc

  • Reply
  • Cancel
  • Cancel

Top Replies

  • noglitch
    noglitch over 6 years ago in reply to Jan Cumps +1 suggested

    Hi,

     

    Due to move to DT, the device name has changed. It is now "fc034000.adc" for this device. So, your command line should be:

    ./generic_buffer -n fc034000.adc -t fc034000.adc-dev0-continuous …

  • noglitch
    noglitch over 6 years ago +1 verified

    FYI, I've just updated the Linux4SAM.org page:

    http://www.at91.com/linux4sam/bin/view/Linux4SAM/IioAdcDriver

    to reflect the changes in naming brought by a Device Tree system.

  • noglitch
    noglitch over 6 years ago in reply to Jan Cumps +1

    Oh thanks for the typo correction.

     

    I use the Linux4SAM 4.7 kernel + rootfs image.

    I took the  generic_buffer.c file in the linux-3.18-at91 kernel and compiled it with a Code Sourcery toolchain (Sourcery CodeBench…

Parents
  • Jan Cumps
    0 Jan Cumps over 6 years ago

    It looks as if that at91_adc module is there, bacuase modprobing it works:

     

    root@sama5d4-xplained:~# modprobe at91_adc

     

    just returns

     

    When I give a fake name:

     

    root@sama5d4-xplained:~# modprobe at91_adb

     

    it errors: modprobe: FATAL: Module at91_adb not found.

     

    So that means that at91_adc is there...

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • noglitch
    0 noglitch over 6 years ago in reply to Jan Cumps

    at91_adc is actually compiled in the kernel (not as a module):

    https://github.com/linux4sam/linux-at91/blob/linux-3.18-at91/arch/arm/configs/sama5_defconfig#L237

     

    You can see it probed running this command:

    dmesg | grep  iio

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
Reply
  • noglitch
    0 noglitch over 6 years ago in reply to Jan Cumps

    at91_adc is actually compiled in the kernel (not as a module):

    https://github.com/linux4sam/linux-at91/blob/linux-3.18-at91/arch/arm/configs/sama5_defconfig#L237

     

    You can see it probed running this command:

    dmesg | grep  iio

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
Children
No Data
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube