- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to read 9 values via the Nios ADC interface and running into some timing issues. Below is the pseudocode for the routine plus the specific API call:
// Configure and start the ADC
adc_stop(ADC_SEQUENCER_CSR_BASE); // ADC must be stopped to change the mode
adc_interrupt_disable(ADC_SEQUENCER_CSR_BASE); // Disable interrupts.
adc_clear_interrupt_status(ADC_SEQUENCER_CSR_BASE);
adc_set_mode_run_continuously(ADC_SEQUENCER_CSR_BASE);
adc_start(ADC_SEQUENCER_CSR_BASE);
alt_adc_word_read(ADC_SAMPLE_
curr_48 = adc_data[0];
curr_24 = adc_data[1];
volt_48 = adc_data[2];
volt_24 = adc_data[3];
volt_6 = adc_data[4];
volt_5 = adc_data[5];
ind_temp = adc_data[6];
pmic_temp = adc_data[7];
tsd = adc_data[8];
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would suggest that you try the Design Store Example Design as a reference and work from there: https://fpgacloud.intel.com/devstore/platform/16.0.0/Standard/adc-data-capture-with-nios-ii-processor/
There are other examples that you may find useful: https://fpgacloud.intel.com/devstore/platform/?search=nios&ip_core=ADC&acds_version=any&family=max-10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I just checked the Design Store and I see several examples for using the ADC, but none of them seem to include a DMA. In fact, it is not explicitly apparent from the descriptions that any of these include an example of DMA transfer from the ADC to memory. Can you please point me to a specific example for that?
Thanks,
Jamie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look at this how-to video in implementing a scatter gather dma with NIOS, and see if you can combine that with NIOS with ADC.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page