How to make multi channel ADC work simultaneously?

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I am working with SAME54 development board. I am using ASF4 framework.

 

How to make multi channel ADC work simultaneously?

 

I am able to successfully implement single channel ADC. But when I try to do multi channel ADC, only one channel is working but not remaining.

 

Please provide sample code with multi channel ADC working.

 

Thanks,

Warm Regards,

Nilesh.

Nilesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nileshb wrote:
Please provide sample code with multi channel ADC working.

 

That will get you nowhere.

 

Are you trying to perform a differential reading?

 

nileshb wrote:

But when I try to do multi channel ADC, only one channel is working but not remaining.

 

Post the minimal code you have written that shows the issue you are having.

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also note that you probably posted in the wrong place. Atmel/Microchip put the "ASF" forum under "AVR" not "ARM" so there may not be many ARM users reading this forum. You are probably better off posting in one of the "Cortex" forums.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But I have posted under ASF all architecture. And my earlier experience we hardly get response on ARM forums

Nilesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you think ARM is bad just wait. Your chances of getting response in AVR+ASF are somewhere between slim and nil.

 

I still think you'd be better off posting in the Cortex forum but perhaps post the multi-channel attempt you have and perhaps someone here could spot something? Are the E54 ADC like those in AVR where there's just one ADC and a multiplexer so you first switch the multiplexer to the input you want to measure then trigger a reading or are you actually using more than one ADC ?

 

EDIT: OK so it looks like you do select input with the MUXPOS/MUXNEG bits in the INPUTCTRL register. So I guess your multi-channel code just differs from the single channel in that it is changing these MUX bits then starting a new reading? Are you manually triggering with START in SWTRIG or are you setting up some kind of auto triggering?

Last Edited: Fri. Jun 14, 2019 - 12:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am able to read multiple channels but one at a time. 

 

To switch over to next channel I have to adc_async_deinit and set new channel adc_async_set_inputs and again reinit adc. Read new channel.

 

But I would like to do without disabling/reenabling adc.

 

Thanks,

Warm Regards,

Nilesh.

Nilesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Look at the Atmel Start ADC DMA sequencing example.

/Lars