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);
Link Copied
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-processo...
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-1...
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
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.
For more complete information about compiler optimizations, see our Optimization Notice.