Workflow

  1. 1.
    Initialize the ACC module so that:
    • ADC channel 5 is connected to its positive input

    • DAC channel 0 is connected to its negative input

    • Generate an interrupt on either edge of the output

    • Disable the ACC module output inversion
      acc_init(ACC, ACC_MR_SELPLUS_AD5, ACC_MR_SELMINUS_DAC0,
              ACC_MR_EDGETYP_ANY, ACC_MR_INV_DIS);
      
  2. 2.
    Enable the ACC module interrupt:
    NVIC_EnableIRQ(ACC_IRQn);
    
    acc_enable_interrupt(ACC);