element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
  • Settings
Enchanted Objects
  • Challenges & Projects
  • Design Challenges
  • Enchanted Objects
  • More
  • Cancel
Enchanted Objects
Blog Review 9a: Atmel SMART SAMA5D4 Xplained Ultra - Set up ADC Buffer with Hardware Trigger Part 1
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 20 May 2015 7:08 PM Date Created
  • Views 1226 views
  • Likes 2 likes
  • Comments 7 comments
  • sama5d4
  • enchanted_player
  • enchanted_objects
  • trigger
  • buffer
  • adc
  • xplained_ultra
  • atmel
Related
Recommended

Review 9a: Atmel SMART SAMA5D4 Xplained Ultra - Set up ADC Buffer with Hardware Trigger Part 1

Jan Cumps
Jan Cumps
20 May 2015

I'm trying the Buffer and Hardware Trigger  capabilities of the SAMA5D4.

I followed the instructions on IioAdcDriver < Linux4SAM < TWiki, but was struggling with one particular command.

I raised a topic on tha at91.com forum. And resolved it myself.

Sometimes writing down your problem leads to the solution.

image

 

Instructible

 

You can read my topic on the at91 site to see where I was in trouble.  (jc: At the time of posting this blog, I didn't know yet that I would get the at91.com treatment)
In this blog, I'll post the how-to.

 

Poky (Yocto Project Reference Distro) 1.6.1 sama5d4-xplained /dev/ttyS0


sama5d4-xplained login: root
root@sama5d4-xplained:~# echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage0_en
root@sama5d4-xplained:~# echo "fc034000.adc-dev0-continuous" > /sys/bus/iio/devices/iio:device0/trigger/current_trigger
root@sama5d4-xplained:~# echo 100 > /sys/bus/iio/devices/iio:device0/buffer/length
root@sama5d4-xplained:~# echo 1 > /sys/bus/iio/devices/iio:device0/buffer/enable
root@sama5d4-xplained:~#

 

This will start the process. The ADC will now fill the character device /dev/iio:device0 with data.

 

How did I get the magic name "fc034000.adc-dev0-continuous"? It's different than the name "at91_adc-dev0-external" used in the AT91.com instructions.

By fiddling around a lot, and then by submitting the command

 

 

root@sama5d4-xplained:/sys/bus/iio/devices/trigger0# cat name
fc034000.adc-dev0-continuous

 

I still have to write a program that reads the character device.

I have already checked the source of drivers/staging/iio/Documentation/generic_buffer.c but I haven't been successful in compiling it yet.

I'll also need to learn how I can set the sampling speed.

I'd like to get 128 samples in 3.86ms. Check my previous post to understand why.


I hope that by putting this example here, I can help fellow developers started with the on-board ADC.

  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 10 years ago in reply to Workshopshed +2
    I did search, and I did find that post. Go read it: http://www.at91.com/discussions/viewtopic.php/f,33/t,24631.html It's difficult to follow because the wits overtones are bigger than the content. It's…
  • Workshopshed
    Workshopshed over 10 years ago in reply to Jan Cumps +2
    Your efforts are valued even if not by the AT91 crew.
  • Jan Cumps
    Jan Cumps over 10 years ago +1
    I held of posting to at91.com for a long time, because often the tone used. Once I started posting a few days ago, I set a counter for myself on how long it would take for blue_z to come in with a you…
  • Workshopshed
    Workshopshed over 10 years ago in reply to Jan Cumps

    Your efforts are valued even if not by the AT91 crew.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago in reply to Workshopshed

    I don't need their backs. I really don't.

    At the end of this exercise I want a nice design where this board plays a significant role.

    But then again, I might just unplug it and put it back in its box if that's how they value the efforts here.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 10 years ago in reply to Jan Cumps

    That does raise an interesting question about what actually is a "distribution".

     

    I suspect you've got their backs up as you've not followed their "rules" for getting things built. These rules are of course not written down and are only passed on to the worthy and can be changed at will....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago in reply to Workshopshed

    Still no joy on the at91.com forum.

    How is there ever going to evolve a happy and thriving community from that??

     

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago in reply to Workshopshed

    I did search, and I did find that post.

    Go read it: http://www.at91.com/discussions/viewtopic.php/f,33/t,24631.html

    It's difficult to follow because the wits overtones are bigger than the content.

     

    It's a theme. The user after me who posted a question got this treatement:

     

    image

    If that documentation would be up to the mark, I could understand that.

    But it isn't up to the mark.As someone learning the subject, you're not helped by the document, and ridiculed away by the community.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube