S12ZVL ADC Tirgger Mode and Restart Mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12ZVL ADC Tirgger Mode and Restart Mode

707 Views
jx1207
Contributor I

Hi,

I want to know the difference of adc trigger mode and restart mode.

And how to set th TRIG bit and RSTA bit in the ADCFLWCTL register in different modes.

For example, I want to get two channels voltages every 10ms. How to set the registers with two different modes.

Thanks!

0 Kudos
1 Reply

431 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,
The differences are explained in the S12ZVL_RM_2.41 Section 10.6.3.2.4.
It is also illustrated in Figure 10-42 (Trigger mode) and Figure 10-44 (Restart mode).

Basically, in Restart mode, the conversion of a conversion list must start with a restart event that is followed by a trigger event. Every sequence in that list is then triggered by subsequent triggers. After EOL, another restart event is needed.
Whereas in Trigger mode, only the initial restart event is needed. After EOL, the restart of conversion flow from top of the list does not require another restart event because returning to the top
of the list is done automatically. So, the conversion can start with a trigger again.

Regarding your use case, you can use only one sequence (2 normal channel conversions + EOL command).
ADC0 can be triggered by TIM0_ch2 Output Compare. It must be routed in MODRR3 register.
Since restart events must be set by the software, the dual access must be set in ADC0CTL_0 register.
When the output of the TIM0_ch2 goes to 1, the ADC is triggered.
You can use either of the ADC modes.
In trigger mode, only the initial restart must be set.
In restart mode, the conversion can be restarted in the ADC interrupt once the previous conversion is complete.

Regards,
Daniel

0 Kudos