Example MPC5744P FlexPWM CTU ADC synchronization

Document created by Petr Stancik Employee on Apr 10, 2015Last modified by Diana Torres on Feb 24, 2017
Version 2Show Document
  • View in full screen mode

********************************************************************************

* Detailed Description:

*

*

* This example shows synchronization between FlexPWM, CTU and ADC modules.

* The FlexPWM Submodule 0 is initialized to generate PWM signal, and rising edge

* of PWM B0 signal is used to generate trigger signal for CTU module. The CTU module

* sends two commands to ADCs. Single conversion mode is used, so ADC0 ch0 and ch1

* are sampled. The conversion result is used to modify PWM B0 rising egde position

* and change delay between external trigger and ADC sequence triggering.

*

* ------------------------------------------------------------------------------

* Test HW:  MPC57xx

* Maskset:  1N65H

* Target :  internal_FLASH

* Fsys:     200 MHz PLL with 40 MHz crystal reference

*

* EVB connection:

*

* P8.1  - A[0]  .. GPIO output, used to see CTU-ADC ISR period

* P9.1     - B[7]  .. ADC0 AN[0] input

* P9.2     - B[8]  .. ADC0 AN[1] input

* P16.4 - I[3] .. CTU0 EXT TRG output

 

* P8.12    - A[11] .. FlexPWM A[0] output

* P8.11    - A[10] .. FlexPWM B[0] output

*

* connect Trimmer J53.1 to P9.1 to change position of PWM B0 rising edge

* connect Trimmer J53.1 to P9.2 to change CTU trigger delay from PWM B0 rising edge

*

* see CTU0 EXT TRG output signal (toggle on each trigger) on P16.4 with respect of PWM signals

*

********************************************************************************

2 people found this helpful

Outcomes