Hello,
I have some questions about the ADC triggering in S32k144. I am using NXP model based design tool box to build the code. With reference to the S32K1xx ADC guidelines, spec and configuration document (Document Number: AN12217)
4.4. TRGMUX trigger
For the example code refer to Appendix D.
The TRGMUX is a very flexible module for interconnecting the trigger inputs of peripherals to a wide
variety of internal and/or external trigger signals (timer modules, analog modules flags, external pins). In
particular for ADC in S32K1xx, the TRGMUX can be used to synchronize conversions with any of the
available trigger signals. It is worth mentioning that the TRGMUX mechanism can be used when triggering
ADC conversions for SC1n registers 0 to 3 [registers SC1A, SC1B, SC1C and SC1D], and this kind of
trigger always goes through the trigger latching gasket.
Does this mean the TRGMUX can be used only for 4 registers ( SC1A to D ) because right now in my model im using 5 registers ( SC1A to SC1E), it seems to work fine. Is there any limitation on using TRGMUX for 5 registers.
Thank you
#S32k144 #MBD
已解决! 转到解答。
Hi@Sriram
I am not familiar with MBDT. If you have any questions about MBDT, please be sure to create a new topic and add MBDT related keywords.
You can see the difference in the red highlight.
1. Each PDB module has 4 channels, and each channel can support 8 pre-trigger channels, which can realize pre-triggering of a total of 32 channels of the ADC module.
2.PDB module supports ADC_COCO
3. If TRGMUX is used to achieve pre-triggering of the ADC channel, it can only be achieved through the LPIT module, and: LPIT doesn’t support ADC_COCO feedback, it needs software to correctly control the ADC trigger timing setting.
4.Software pre-trigger,SIM_ADCOPT[ADCxSWPRETRG].
The summary is that PDB perfectly supports ADC and is specially designed for the ADC module.
This is what I can explain, for more details you need to read the data sheet yourself
Hello @Senlent ,
Thank you for your quick reply. I have attached few pics from the matlab model,
First 2 pics are from the PDB Init dialog box. In adc0 im using 5 channels and they are triggered by trigmux_pdb_trig. All 5 channels seems to be working fine when i trigger it with trigmux
The pic below is the ADC init dialog box. In the pre trigger source, there are 3 options - PDB , TRGMUX and SOFTWARE . What is the difference between the PDB trigger and TRGMUX
Thank u
Hi@Sriram
I am not familiar with MBDT. If you have any questions about MBDT, please be sure to create a new topic and add MBDT related keywords.
You can see the difference in the red highlight.
1. Each PDB module has 4 channels, and each channel can support 8 pre-trigger channels, which can realize pre-triggering of a total of 32 channels of the ADC module.
2.PDB module supports ADC_COCO
3. If TRGMUX is used to achieve pre-triggering of the ADC channel, it can only be achieved through the LPIT module, and: LPIT doesn’t support ADC_COCO feedback, it needs software to correctly control the ADC trigger timing setting.
4.Software pre-trigger,SIM_ADCOPT[ADCxSWPRETRG].
The summary is that PDB perfectly supports ADC and is specially designed for the ADC module.
This is what I can explain, for more details you need to read the data sheet yourself
Here, you are setting a software pre-trigger, so there will be no such limitation.
If it is hardware pre-trigger is implemented through TRGMUX, then you can only use LPIT, and only SC1A to D can be used.