Example MPC5775K eTimer_PWM S32DS_1.0

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

Example MPC5775K eTimer_PWM S32DS_1.0

Example MPC5775K eTimer_PWM S32DS_1.0

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

* Detailed Description:

* Application performs basic initialization, setup PLL to maximum allowed freq.,

* setup clock for peripherals.

*

* This example shows, how to use some of ETimer modes. Channel 0 is set to

* Fixed-Frequency PWM Mode and generates PWM signal with approximate frequency

* 507Hz. This signal is routed to the UserLED1.

*

* Channel 1 is set to Count mode and generates 0,25 second interrupt.

* In the interrupt service routine, duty cycle is increased from 0% to 100%

* with step 6.25%. This shows for example, how can be controlled the brightness

* of the LED.

*

* Channel 2 is set to Variable-Frequency PWM Mode and generates PWM signal with

* frequency 10KHz. This signal is routed to the UserLED2.

*

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

* Test HW:         MPC5775K-356DS, MPC57xx Motherboard

* MCU:             PPC5775KMMY3A 0N76P

* Terminal:

* Fsys:            PLL0 266MHz

*                    Z4 Core 133MHz

* Debugger:        Lauterbach Trace32

*                  PeMicro USB-ML-PPCNEXUS

* Target:          internal_FLASH (debug mode, release mode)

* EVB connection:  UserLED1 connected to P19.0

*                     UserLED2 connected to P19.2

*

*

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

Labels (1)
Tags (1)
Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1129433%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20MPC5775K%20eTimer_PWM%20S32DS_1.0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1129433%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3C%2FP%3E%3CP%3E*%20Detailed%20Description%3A%3C%2FP%3E%3CP%3E*%20Application%20performs%20basic%20initialization%2C%20setup%20PLL%20to%20maximum%20allowed%20freq.%2C%3C%2FP%3E%3CP%3E*%20setup%20clock%20for%20peripherals.%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20This%20example%20shows%2C%20how%20to%20use%20some%20of%20ETimer%20modes.%20Channel%200%20is%20set%20to%3C%2FP%3E%3CP%3E*%20Fixed-Frequency%20PWM%20Mode%20and%20generates%20PWM%20signal%20with%20approximate%20frequency%3C%2FP%3E%3CP%3E*%20507Hz.%20This%20signal%20is%20routed%20to%20the%20UserLED1.%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20Channel%201%20is%20set%20to%20Count%20mode%20and%20generates%200%2C25%20second%20interrupt.%3C%2FP%3E%3CP%3E*%20In%20the%20interrupt%20service%20routine%2C%20duty%20cycle%20is%20increased%20from%200%25%20to%20100%25%3C%2FP%3E%3CP%3E*%20with%20step%206.25%25.%20This%20shows%20for%20example%2C%20how%20can%20be%20controlled%20the%20brightness%3C%2FP%3E%3CP%3E*%20of%20the%20LED.%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20Channel%202%20is%20set%20to%20Variable-Frequency%20PWM%20Mode%20and%20generates%20PWM%20signal%20with%3C%2FP%3E%3CP%3E*%20frequency%2010KHz.%20This%20signal%20is%20routed%20to%20the%20UserLED2.%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20------------------------------------------------------------------------------%3C%2FP%3E%3CP%3E*%20Test%20HW%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20MPC5775K-356DS%2C%20MPC57xx%20Motherboard%3C%2FP%3E%3CP%3E*%20MCU%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PPC5775KMMY3A%200N76P%3C%2FP%3E%3CP%3E*%20Terminal%3A%3C%2FP%3E%3CP%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PLL0%20266MHz%3C%2FP%3E%3CP%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Z4%20Core%20133MHz%3C%2FP%3E%3CP%3E*%20Debugger%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Lauterbach%20Trace32%3C%2FP%3E%3CP%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PeMicro%20USB-ML-PPCNEXUS%3C%2FP%3E%3CP%3E*%20Target%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20internal_FLASH%20(debug%20mode%2C%20release%20mode)%3C%2FP%3E%3CP%3E*%20EVB%20connection%3A%26nbsp%3B%20UserLED1%20connected%20to%20P19.0%3C%2FP%3E%3CP%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20UserLED2%20connected%20to%20P19.2%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1129433%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3C%2FP%3E%3CP%3E*%20Detailed%20Description%3A%3C%2FP%3E%3CP%3E*%20Application%20performs%20basic%20initialization%2C%20setup%20PLL%20to%20maximum%20allowed%20freq.%2C%3C%2FP%3E%3CP%3E*%20setup%20clock%20for%20peripherals.%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20This%20example%20shows%2C%20how%20to%20use%20some%20of%20ETimer%20modes.%20Channel%200%20is%20set%20to%3C%2FP%3E%3CP%3E*%20Fixed-Frequency%20PWM%20Mode%20and%20generates%20PWM%20signal%20with%20approximate%20frequency%3C%2FP%3E%3CP%3E*%20507Hz.%20This%20signal%20is%20routed%20to%20the%20UserLED1.%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20Channel%201%20is%20set%20to%20Count%20mode%20and%20generates%200%2C25%20second%20interrupt.%3C%2FP%3E%3CP%3E*%20In%20the%20interrupt%20service%20routine%2C%20duty%20cycle%20is%20increased%20from%200%25%20to%20100%25%3C%2FP%3E%3CP%3E*%20with%20step%206.25%25.%20This%20shows%20for%20example%2C%20how%20can%20be%20controlled%20the%20brightness%3C%2FP%3E%3CP%3E*%20of%20the%20LED.%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20Channel%202%20is%20set%20to%20Variable-Frequency%20PWM%20Mode%20and%20generates%20PWM%20signal%20with%3C%2FP%3E%3CP%3E*%20frequency%2010KHz.%20This%20signal%20is%20routed%20to%20the%20UserLED2.%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20------------------------------------------------------------------------------%3C%2FP%3E%3CP%3E*%20Test%20HW%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20MPC5775K-356DS%2C%20MPC57xx%20Motherboard%3C%2FP%3E%3CP%3E*%20MCU%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PPC5775KMMY3A%200N76P%3C%2FP%3E%3CP%3E*%20Terminal%3A%3C%2FP%3E%3CP%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PLL0%20266MHz%3C%2FP%3E%3CP%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Z4%20Core%20133MHz%3C%2FP%3E%3CP%3E*%20Debugger%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Lauterbach%20Trace32%3C%2FP%3E%3CP%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PeMicro%20USB-ML-PPCNEXUS%3C%2FP%3E%3CP%3E*%20Target%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20internal_FLASH%20(debug%20mode%2C%20release%20mode)%3C%2FP%3E%3CP%3E*%20EVB%20connection%3A%26nbsp%3B%20UserLED1%20connected%20to%20P19.0%3C%2FP%3E%3CP%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20UserLED2%20connected%20to%20P19.2%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1129433%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EGeneral%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎03-03-2016 07:51 AM
Updated by: