Slide 1: Programmable Delay Block (PDB) module for Kinetis K series MCUs
Hello and welcome to this presentation of the Programmable Delay Block, or PDB, module for Kinetis K series MCUs. In this session you’ll learn about the PDB module, its main features and the application benefits of leveraging this function. 0
Slide 2: Training agenda
The agenda for this training includes: • A module overview • The on-chip interconnections and inter-module dependencies. • Hardware configuration and software configuration • An example use case • And a few frequently asked questions 1
Slide 3: Module overview
We first begin with a module overview. 2
Slide 4: PDB Features
PDB Features The Programmable Delay Block, or PDB, is a timer that provides controllable delays to the hardware trigger inputs of ADCs and/or generates the interval triggers to DACs; so that the precise timing between ADC conversion and/or DAC updates can be achieved. It can also provide pulse outpu
Slide 5: PDB Block Diagram
PDB Block Diagram Here is a high-level block diagram of the PDB available on the majority of Kinetis MCUs. The PDB module is composed of common registers that allow you to select the PDB clock signal value, value input trigger, trigger and interrupt settings register register. • PDB channels used fo
Slide 6: PDB ADC Triggering: Channels
PDB ADC Triggering: Channels PDB is mainly used for ADC triggering. For this purpose, PDB uses channels that can be configured independently. Each of these channels is associated with one ADC. A PDB channel is formed with prepre-trigger trigger signals; one acknowledgement input signal for each pre-
Slide 7: PDB ADC Triggering: One-Shot Mode
PDB ADC Triggering: One-Shot Mode Let’s take a look at an example of a time diagram demonstrating the one-shot configuration functionality. • First, the PDB module receives a positive input trigger that resets the PDB counter and counting begins begins. • Once the counter reaches the PDB delay value
Slide 8: PDB ADC Triggering: Back-to-Back Mode
PDB ADC Triggering: Back-to-Back Mode The main difference between back-to-back mode and one-shot mode is that back- to-back mode needs to receive an ADC conversion complete flag to trigger the next PDB channel. • Similar to one one-shot shot mode mode, the PDB will receive an input trigger to begin
Slide 9: PDB ADC Triggering: Back-to-Back Mode – Continued
PDB ADC Triggering: Back-to-Back Mode – Continued Internally, ADC conversion complete flags are connected to acknowledge the next pre-trigger and trigger output. When an ADC conversion hasn’t finished, a new trigger from PDB cannot be accepted by ADC. If this condition is overridden, a sequence erro
Slide 10: PDB DAC Triggering
PDB DAC Triggering PDB can generate interval triggers for DACs to update their outputs periodically. • If DAC hardware trigger output is enabled, a trigger signal is sent to the DAC each time the counter reaches the DAC interval. • If periodic pulses are needed, configure the PDB counter to continuo
Slide 11: PDB Pulse-Outs
PDB Pulse-Outs • PDB can generate pulse outputs of configurable width. This signal is connected to the comparator module and can be used for the sample window. • When the PDB counter reaches the value set in delay-1 (DLY1), the Pulse-Out goes high. When the counter reaches DLY2, it goes low. DLY2 ca
Slide 12: On-chip interconnection and inter-module dependencies
Let’s move onto on-chip interconnection and inter-module dependencies. 11
Slide 13: PDB Interconnections and Inter-module Dependencies
PDB Interconnections and Inter-module Dependencies Like we saw previously, the PDB is capable of generating trigger outputs to analog modules such as the ADC, DAC and comparator. To achieve this, the PDB can be triggered by internal modules like the ADC or TIMER modules like the PIT PIT, FTM FTM, RT
Slide 14: Hardware configuration
Now, let’s talk about hardware configuration. 13
Slide 15: PDB Hardware Configuration
PDB Hardware Configuration Input Trigger The PDB can select up to 16 input trigger signals, including: an external trigger, a software trigger, and other internal modules. Common Settings The PDB module uses common settings such as input trigger, clock frequency and continuous or single mode even th
Slide 16: Software configuration
Let’s move onto software configuration. 15
Slide 17: One-Shot Mode ADC Triggering Configuration
One-Shot Mode ADC Triggering Configuration To initialize the PDB driver, prepare configuration structure PdbTimerConfig and populate it with the desired configuration. After the configuration structure is available, initialize the PDB module by calling the API function PDB_DRV_Init(). For ADC trigge
Slide 18: DAC Interval Triggering Configuration
DAC Interval Triggering Configuration First, initialize the PDB common settings, such as the PdbTimerConfig structure and modulus register. For the DAC Interval trigger configuration, prepare the pdb_dac_configuration structure and populate it with desired values. values After the configuration stru
Slide 19: Example use case
Now, let’s go review an example use case. 18
Slide 20: ADC/PWM Synchronization Using PDB
ADC/PWM Synchronization Using PDB In this example, we demonstrate how the PDB block can be used to synchronize FTM/PWM and ADC channels. This specific technique is commonly used for motor control applications. The PDB module is configured to use an FTM input trigger source source. PDB channel 1 will
Slide 21: Frequently asked questions
Finally, some frequently asked questions. 20
Slide 22: PDB Frequently Asked Questions (FAQs)
PDB Frequently Asked Questions (FAQs) Q: Can I connect PDB triggers to external pins? A: PDB triggers are internally connected either to the ADC, DAC or the comparator module. However, an interrupt can be used to set an external pin when PDB reaches a certain value. Q: Can I use different input trig
Slide 23: Conclusion and further resources
This concludes our presentation on the PDB module for Kinetis K series MCUs. For more information on the PDB module, please visit the resources listed here. We also invite you to visit us on the web at Freescale.com/Kinetis and check out our Kinetis community page. 22
Slide 24: Freescale
freescale eo oe %e so os Ps 23