Example S32K144 PDB ADC DMA S32DS.ARM.2018.R1

Document created by Petr Stancik Employee on May 7, 2019
Version 1Show Document
  • View in full screen mode
Detailed Description:

Example shows possible implementation of multiple ADC conversions using SDK.
Here 25 channels are sampled periodically.

2 ADC modules and 2 PDBs are used.
ADC0 is configured to sample 16 channels, ADC1 9 channels.
PDBs are set to back-to-back mode to perform chain conversion.
Within ADC component you need to select ADC input to be measured for each item
in configuration list. For ADC0 channels ADC ch12 is selected, as it is connected
to trimmer on the EVB.
DMA is used to read result into single buffer, and DMA callbacks are issued
to indicate end of transfer for each ADC module.
Within those callbacks PTE14 and PTE15 is toggled.
PDB0 output pulse is generated on the PTE16 to indicate start of ADC measurement.
This is done periodically at LPIT ch0 rate, which is set to 30us.

The ADC0 ch0 result is used to dim LEDs.

* ------------------------------------------------------------------------------
* Test HW:       S32K144EVB-Q100
* MCU:           FS32K144UAVLL 0N57U
* Target:        Debug_FLASH
* EVB connection:
* Compiler:      S32DS.ARM.2018.R1
* SDK release:   S32SDK_S32K1xx_RTM_3.0.0
* Debugger:      Lauterbach Trace32
Revision History:
Ver Date          Author          Description of Changes
0.1 May-04-2019   Petr Stancik    Initial version
2 people found this helpful