Hi,
From TRM (SPNU608A–March 2018) it is a bit difficult to interpret the detailed action properly in case there are multiple groups triggered "simultaneously".
It is clear that by default group in conversion is not kicked out (20.4.6):
"If the new conversion request comes from a separate group, then the ongoing channel’s conversion will be completed before starting the new sequence of conversions."
It is also clear that in case multiple groups has pending trigger the priority order listed in 20.4.4 applies.
In 20.4.4 is mentioned also freeze but description of it quite doesn't match to what registers has - this talks about freezing higher priority groups.
"The conversion group freeze capability allows the application to override this default priority between the conversion groups. Enabling the freeze capability allows the ADC to freeze a higher-priority conversion group’s conversions whenever there is a request for conversion in another (lower-priority) group."
If looking for example ADG1MODECR (bit FRZ_G1) it says that also higher prio event group is capable of kicking G1 out opposed to TRM 20.4.4 which claims that only higher prios can be kicked out:
"This bit allows a Group1 conversion sequence to be frozen if an Event Group or a Group2 conversion is requested. The Group1 conversion is kept frozen while the Event Group or Group2 conversion is active, and continues from where it was frozen once the Event Group or Group2 conversions are completed."
We have the following needs:
- 1 group (say eventgroup) shall be always converted at fixed interval (say 25us) so conversion must always happen in 25us period
- 1 group (say group1) shall be converted when ever timings not matter, just to have fresh result when requested (this is AD based temperature).
Based on 20.4.4 text I cannot use RTI_COMP on event group ja continuous conversion on G1 since most likely G1 is on conversion when when RTI_COMP hits. But based on MODECR description I could do that if setting FRZ-bit and G1 would be kicked out when ever there is a time to convert event group...
Bullet proof option most likely would be (regardless of TRM interpretation) to hook RTI_COMP to both groups and manually ensure that conversion time of both groups is less than RTI_COMP period, since in this case groups would always get trigger simultaneously and internal priority shall guarantee that conversion order stays always the same thus ensuring fixed 25us sample time for event group.
Question1: which one is correct, text in 20.4.4 or text in MODECR register(s)?
Question2: would FRZ-bit in G1 provide guaranteed/fixed/unaltered execution of event group per RTI_COMP signalling despite how G1 is triggered (is it single time manual on continous conversion)
Asking this because testing of actual behavior is quite "challenging", FRZ-bit would be elegant solution, using RTI_COMP in both groups seems a bit kludge but still bulletproof.