Dear NXP support,
I have an S32K344 with which I try to set up the ADC. I'm using RTD 2.0.0. On ADC0 I want to have a group "GROUP_NORMAL" configured with normal hardware trigger and a group "GROUP_INJ" with injected hardware trigger (that will stop the normal conversion of GROUP_NORMAL if that would be ongoing).
As normal hw trigger I use a GPT PIT and as injected hw trigger I use an eMIOS as source. In the reference manual and the RTD documents related to the ADC (ADC User manual and ADC Integration manual) I can't find anything that suggests that this combination of trigger for an ADC instance would not be possible.
However, with this configuration after initialisation (after calibration) only setup of the first group works and not the second, i.e. with the code
Adc_SetupResultBuffer(GROUP_NORMAL, setupResultBuffer0);
Adc_SetupResultBuffer(GROUP_INJ, setupResultBuffer1);
Adc_EnableHardwareTrigger(GROUP_NORMAL);
Adc_EnableHardwareTrigger(GROUP_INJ);
only GROUP_NORMAL are actually doing conversion, not GROUP_INJ. After some investigation in the debugger I found that in Adc_EnableHardwareTrigger() the program end up in Adc_ValidateNotBusyEnableHwTrig() (which returns E_NOT_OK) where the following information is in a comment:
/* It's possible to run (normal HW - injected SW) or (injected HW - normal SW) combination */
This comment explains why my trigger combination does not work. But where is this mentioned in the manuals?
How can I implement my trigger combination? I do not want to do a workaround by going via a SW trigger as the trigger should not depend on the SW application state. I believe this a quite a basic implementation case, so how should I proceed? What are your solutions and suggestions? Using the BCTU in control mode for ADC0 instead would be ok if no SW trigger is required.
Best regards,
Olof