SAM4N ADC Sequencer does not work for me.

Discussion around product based on ARM Cortex M4 core.

Moderators: nferre, ncollot

Posts: 36
Joined: Fri Nov 10, 2006 12:05 am

SAM4N ADC Sequencer does not work for me.

Fri Aug 28, 2015 3:52 am


First basci qustions:
1) Which bitfield in ADC_SEQ1 register is first in the sequence? Theuy are not labelled in the DS
2) Can the sequencer work with software trigger?

I need a sequnece of 7,15,6,5,4 with irq on EOC of 4.

I use the ASF for this and it sets
ADC_SEQ1 = 0x000456f7
ADC_MR = 0xa2040700 so the sequencer is enabled.
ADC_IMR = 0x000080f0 which is correct

I initially trigger with
adc_start_software_conversion(ADC); (software trigger to ADC_CR)

When I run this, I get 1 irq on EOC 4 with ADC_ASR = 0x00000010. (not sure if that is right)
After this, I retrigger with

Then the cpu runs into the hills with cal_stack etc all lost.

I have no idea why.

There is no example that indicataes the use of the sequencer.

Any ideas, greatly apprecisated.


Return to “SAM4 Cortex-M4 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest