To configure ADC oversampling using the trigger repeater module, follow this procedure:
- Set up the SOC by writing to ADCSOCxCTL. Specify the repeater module (REP1TRIG) as the trigger source.
- Configure the repeater module by writing to the REP1CTL register:
- Specify the desired SOC trigger source in the TRIGGER field.
- If desired, configure a sync source for the repeater module in the SYNCINSEL field. A sync event resets all repeater registers to a ready and waiting state, while preserving NSEL. A software-initiated sync is also possible by writing 1 to the SWSYNC bit.
- If desired, clear any previously set phase and trigger overflow flags by writing to the TRIGGEROVF bits.
- Configure the trigger repeat count by writing to the REP1N.NSEL register. The repeater module supports up to 8 repeats for each trigger.
- To configure a re-trigger spread delay in oversampling mode, write the desired delay value in SYSCLK cycles to the REP1SPREAD.SPREAD register.
- Configure the PPB1LIMIT register. This register defines how many samples the post-processing block accumulates before loading the partial sum value in ADCPPB1PSUM into ADCPPB1SUM.
- The post-processing block (PPB) and trigger repeater module have independent sync source configurations. To configure the PPB sync source, write to the ADCPPB1CONFIG2 register. For more information on how to configure the ADC post-processing block, see Section 12.7.
Note: When NSEL = 0, the repeater module essentially acts as a pass-through for SOC triggers, but is still useful for applying phase delay. SOC triggers are passed through , even if there are still pending SOCs. In this scenario, the ADC sets a trigger overflow flag for the individual SOC (ADCSOCOVF1.SOCx), not the repeater module. When oversampling with NSEL > 0, the ADC sets the oversampled trigger overflow flag
(REP1CTL.TRIGGEROVF) if a trigger arrives while there are pending SOCs.
When NSEL = 0, the repeater module does not set the REP1CTL.MODULEBUSY indicator. In this scenario, the application must make sure that all associated SOC flags have completed before enabling oversampling mode by setting NSEL > 0.
Note: Only the PPB1 instance can be configured for accumulation.