This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I would like to sample different analog values simultaneously and having two different trigger sources: PWM1_SOCA_TRIGGER (TBCTR = 0) and PWM1_SOCB_TRIGGER (TBCTR = PERIOD).
For instance, in ADC A I have 4 channels to convert and in ADC B only two channels. I need that first 2channels of both ADC modules are sampled simultaneously. Is there any problem in SOC priority if SOC conversions (in time) are not in order? (See module A in time line, the order is SOC0, SOC1, SOC4,SOC5...).
Is there any difference in time conversion with the following setup due to priority?
Thank you very much!
Maite
Note: Edited formatting for clarity -DC
Hi Maite,
The easiest and safest way to go is to setup all the ADCs using the same SOCs and priority mode and for like SOCs to use like trigger select and like S+H duration. This will ensure that the ADCs operate in lock-step, which will ensure that your simultaneous samples are always actually simultaneous. This may require dummy SOCs for the ADC that has less channels to convert.
It probably won't matter too much for you, since your triggers will have a fixed phase relationship.
As far as the SOC ordering, you probably wan't the second one (and, as previously mentioned, you may want to stuff in some dummy SOCs to get both sets of conversions to 4 x for each ADC). Consider the order of sampling that occurs in the first case:
As you can see, this results in different sample orders for every-other set of conversions, which is usually not desirable. In general, it is usually desirable to keep all conversions for a given trigger in a consecutive set of SOCs. If you want conversions from a given trigger to be higher priority, change the SOC priority control to allocate some high-priority SOCs and then assign all the samples for that trigger there.