Hi,
I am using S32k144 controller, and for ADC conversion I have selected PDB triggering. I want to understand the operation in the following Scenarios :
Case 1.: I set the value of PDB0 modulus as 10ms and all pre-trigger delay values as 100us and configured 8 ADC channels of ADC-0 with PDB Channel -0 for periodic conversions. So what will happen after the conversion of all 8 channels? Will PDB wait for modulus counter to reset and then trigger next round of conversion(i.e after 10ms) ? or Conversion will keep goes on continuously?
Case 2: If I want to use PDB0 CH0 for 8 ADC0 channels and PDB1 CH0 for 8 ADC1 channels, what configuration I need to do so that after PDB0 conversions automatically PDB1 will be triggered.
Case 3: If I want to use PDB0 CH0 for 8 ADC0 channels and PDB0 CH1 for the next 8 ADC0 channels, then will PDB0 CH1 will be triggered automatically after PDB0 CH0 conversions? or I have to trigger PDB0 CH1 manually?
Thanks,
Pawan
Solved! Go to Solution.
Hi,
1) The modulus value in the Modulus register (MOD) is used to reset the counter back to zero at the end of the count. If the Continuous Mode Enable (SC[CONT]) is set, then the counter will then resume a new count; otherwise, the counter operation will stop until the next trigger input event occurs.
2) if back-to-back mode is selected then always first pretrigger of the back-to-back connection chain has BB bit cleared and TOS set, thus a pretrigger's delay defines a time when this pretrigger is asserted. So you have to set such a delay, previous conversions of 8 ADC channels finished on channel 0 and so next back-to-back chain can start.
3) no, you have to define a delay as writen above.
Note: direct chaining between CH0 and CH1 of the PDB module is supported on S32K14xW variant only
BR, Petr
Hi,
1) The modulus value in the Modulus register (MOD) is used to reset the counter back to zero at the end of the count. If the Continuous Mode Enable (SC[CONT]) is set, then the counter will then resume a new count; otherwise, the counter operation will stop until the next trigger input event occurs.
2) if back-to-back mode is selected then always first pretrigger of the back-to-back connection chain has BB bit cleared and TOS set, thus a pretrigger's delay defines a time when this pretrigger is asserted. So you have to set such a delay, previous conversions of 8 ADC channels finished on channel 0 and so next back-to-back chain can start.
3) no, you have to define a delay as writen above.
Note: direct chaining between CH0 and CH1 of the PDB module is supported on S32K14xW variant only
BR, Petr
Thanks PetrS.
I have Enabled Continuous mode and selected back-to-back mode for 8 ADC on channels0.
So, after triggering PDB I am trying to read respective ADC result registers inside code's main() routine but values are not updating.
But, when I am reading the same registers in any ISR routine (eg. PDB or ADC isr) I am getting updated/fresh value.
Why is this behavior? Why I am not getting updated value if reading in regular main() routine?
Hi,
this will be due to locked pretrigger from PDB. As written in chapter 46.4.1 PDB pre-trigger and trigger outputs of the RM...
So you need to read ADC results in time so this lock does not happen.
BR, Petr