Arduino processor configuration commands

Hello

I found such and similar commands.:


    adc_init(ADC, 84000000, 20000000, 1000);
    adc_configure_timing(ADC, 0, ADC_SETTLING_TIME_0, 0);
    adc_configure_trigger(ADC, ADC_TRIG_SW, 1); // Disable hardware trigger.
    adc_disable_interrupt(ADC, 0xFFFFFFFF); // Disable all ADC interrupts.
    adc_disable_all_channel(ADC);
    adc_enable_channel(ADC, ADC_CHANNEL_0);
    adc_start(ADC);
  pmc_enable_periph_clk (DACC_INTERFACE_ID) ; // start clocking DAC
  dacc_reset(DACC);
  dacc_set_transfer_mode(DACC, 0);
  dacc_set_power_save(DACC, 0, 1);            // sleep = 0, fastwkup = 1
  dacc_set_analog_control(DACC, DACC_ACR_IBCTLCH0(0x02) | DACC_ACR_IBCTLCH1(0x02) | DACC_ACR_IBCTLDACCORE(0x01));
  dacc_set_trigger(DACC, 1);

etc.

Where can I access the references for these commands?

I've been looking for a while but haven't found it yet. However, it would be good to understand and write the program.

I just googled one of the function names and this came up: ASF Source Code Documentation

Which board are you using?

I'm using an Arduino due.

I usually searched with Arduino. That could have been the problem.
Is there any list where I can find all such commands? Because there were only ADCs here and you found that you were looking for an existing command.

But if I don't want to set up an ADC and I don't know a command for what I want to set, I should still find it somehow.

Therefore, it would be good to have something listed that includes the codes for everything ADC, DAC, etc.

Then you should use the documentation for the SAM3X.

All documentation is on the same website: ASF Source Code Documentation

Thank you

I'd like some more help.

I'm trying to interpret this code in detail:

  pmc_enable_periph_clk (DACC_INTERFACE_ID) ; 
  dacc_reset(DACC);                           
  dacc_set_transfer_mode(DACC, 0);        
  dacc_set_power_save(DACC, 0, 1);        
  dacc_set_analog_control(DACC, DACC_ACR_IBCTLCH0(0x02) | DACC_ACR_IBCTLCH1(0x02) | DACC_ACR_IBCTLDACCORE(0x01));
  dacc_set_trigger(DACC, 1);             

I found the commands where you wrote them. But not such as DACC, DACC_INTERFACE_ID, etc.
Where are these defined? Where can you find them?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.