Example MPC5744P FlexPWM shifted PWM GHS616

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example MPC5744P FlexPWM shifted PWM GHS616

Example MPC5744P FlexPWM shifted PWM GHS616

********************************************************************************
* Detailed Description:
*
* The example shows how to initialize 3 submodules to generate 120° phase shift
* between submodules.
* CNTR register of each submodule is initialized with shifted value when PWM
* generators are disabled using FORCE feature.
*
* ------------------------------------------------------------------------------
* Test HW:  MPC5744P (MPC5744P-257DS + MPC577xx motherboard)
* Maskset:  1N15P
* Target :  internal_FLASH, RAM
* Fsys:     200 MHz PLL with 40 MHz crystal reference
*
* EVB connection:
*
* P8.12    - A[11] .. FlexPWM A[0] output
* P8.11    - A[10] .. FlexPWM B[0] output
* P8.13    - A[12] .. FlexPWM A[2] output
* P8.14    - A[13] .. FlexPWM B[2] output
* P10.8    - C[7] .. FlexPWM A[1] output
* P10.7    - C[6] .. FlexPWM B[1] output
*
********************************************************************************

pastedImage_1.png

Attachments
Comments

I need to control a motor, do you know how to change the duty of PWM while the code is running?

%3CLINGO-SUB%20id%3D%22lingo-sub-1118525%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20MPC5744P%20FlexPWM%20shifted%20PWM%20GHS616%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118525%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3E*%20Detailed%20Description%3A%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20The%20example%20shows%20how%20to%20initialize%203%20submodules%20to%20generate%20120%C2%B0%20phase%20shift%3CBR%20%2F%3E*%20between%20submodules.%3CBR%20%2F%3E*%20CNTR%20register%20of%20each%20submodule%20is%20initialized%20with%20shifted%20value%20when%20PWM%3CBR%20%2F%3E*%20generators%20are%20disabled%20using%20FORCE%20feature.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20------------------------------------------------------------------------------%3CBR%20%2F%3E*%20Test%20HW%3A%26nbsp%3B%20MPC5744P%20(MPC5744P-257DS%20%2B%20MPC577xx%20motherboard)%3CBR%20%2F%3E*%20Maskset%3A%26nbsp%3B%201N15P%3CBR%20%2F%3E*%20Target%20%3A%26nbsp%3B%20internal_FLASH%2C%20RAM%3CBR%20%2F%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20200%20MHz%20PLL%20with%2040%20MHz%20crystal%20reference%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20EVB%20connection%3A%20%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20P8.12%26nbsp%3B%26nbsp%3B%20%26nbsp%3B-%20A%5B11%5D%20..%20FlexPWM%20A%5B0%5D%20output%20%3CBR%20%2F%3E*%20P8.11%26nbsp%3B%26nbsp%3B%20%26nbsp%3B-%20A%5B10%5D%20..%20FlexPWM%20B%5B0%5D%20output%3CBR%20%2F%3E*%20P8.13%26nbsp%3B%26nbsp%3B%20%26nbsp%3B-%20A%5B12%5D%20..%20FlexPWM%20A%5B2%5D%20output%20%3CBR%20%2F%3E*%20P8.14%26nbsp%3B%26nbsp%3B%20%26nbsp%3B-%20A%5B13%5D%20..%20FlexPWM%20B%5B2%5D%20output%3CBR%20%2F%3E*%20P10.8%26nbsp%3B%26nbsp%3B%20%26nbsp%3B-%20C%5B7%5D%20..%20FlexPWM%20A%5B1%5D%20output%20%3CBR%20%2F%3E*%20P10.7%26nbsp%3B%26nbsp%3B%20%26nbsp%3B-%20C%5B6%5D%20..%20FlexPWM%20B%5B1%5D%20output%3CBR%20%2F%3E*%3CBR%20%2F%3E********************************************************************************%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111093iDB9F2E6E6C480C28%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_1.png%22%20alt%3D%22pastedImage_1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1118526%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20MPC5744P%20FlexPWM%20shifted%20PWM%20GHS616%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118526%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20need%20to%20control%20a%20motor%2C%20do%20you%20know%20how%20to%20change%20the%20duty%20of%20PWM%20while%20the%20code%20is%20running%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎04-26-2017 01:39 AM
Updated by: