at91sam9g25 ADC programming example

Discussions about all user software around SAM Series.

Moderator: nferre

mcon
Posts: 2
Joined: Sun Oct 18, 2015 3:43 pm

at91sam9g25 ADC programming example

Sun Oct 18, 2015 4:04 pm

Hi,
after a very long search I gave up and here I am:

I need to get a very minimal example of SAM9G25 ADC usage.

I cannot use any lib because I need to do some simple checks in at91bootstrap before I actually attempt Linux loading.
I thus need to go down to the register level in the leanest possible way.

I was unable to find any low-level description (beside the Register Documentation in the Data sheet).
All code I found seems to pertain to other (incompatible) MCUs.
A working example would be very welcome.

Can someone point me in the right direction, please?

Regards
Mauro
blue_z
Location: USA
Posts: 1507
Joined: Thu Apr 19, 2007 10:15 pm

Re: at91sam9g25 ADC programming example

Mon Oct 19, 2015 9:01 pm

mcon wrote:I need to get a very minimal example of SAM9G25 ADC usage.
...
Can someone point me in the right direction, please?
You should look at the Atmel Software Package for your SoC, e.g. http://www.atmel.com/tools/SAM9G25SOFTWAREPACKAGE.aspx

Regards
mcon
Posts: 2
Joined: Sun Oct 18, 2015 3:43 pm

Re: at91sam9g25 ADC programming example

Mon Oct 19, 2015 9:56 pm

blue_z wrote:You should look at the Atmel Software Package for your SoC, e.g. http://www.atmel.com/tools/SAM9G25SOFTWAREPACKAGE.aspx
Thanks blue_z,
unfortunately the code in that package is completely useless.
It's convoluted, redundant and hardly comprehensible; I cannot use it as-is because I need to squeeze the acquisition in a few registry settings. Reverse-engineering that to extract meaningful information is harder than trying to devise what I need to do directly from data-sheet.

Having a menuing system to decide if DMA/ISR/whatever is to be used and then call a generic function doing its magics is a good way to demonstrate hardware capabilities, much less so to teach about register usage.

Again: Is there any straightforward, register-level, no-nonsense ADC example somewhere?

Thanks
Mauro

Return to “Software”

Who is online

Users browsing this forum: No registered users and 1 guest