********************************************************************************
* Detailed Description:
* Example demonstates Shifted PWM generating via eMIOS.
* The shift is 25% duty cycle.
* ------------------------------------------------------------------------------
* Test HW: MPC5644A + XPC564A minimodule + XPC56XX mother board
* Maskset: OM14X
* Target : Internal Flash
* Fsys: 16MHz IRC
*
* EVB settings:
* PJ8 pin 0 is eMIOS CH[0]
* PJ8 pin 2 is eMIOS CH[2]
********************************************************************************
Revision History:
1.0 Jun-23-2016 b21190(Vlna Peter) Initial Version
*******************************************************************************/
Peter, I downloaded your example and adapted it for the TRK-MCP5606B board using Codewarrior for MCU (V10.6) and I was able to get it to work, but I have a question. I'd like to have two PWM channels, with one permanently shifted from the other by 50% of the period, but I would like to have them center allgned. I've been trying to adapt your example for this scenario. On the 5606B, the definitions of the A1 and B1 registers change when going from edge-aligned to center-aligned. I don't need any deadtime, but I've been reading chapter 27.4 of MPC5606BRM.pdf (27.4.4.1.1.10 Center Aligned Output PWM). From what I gather, I'll have to use two separate counters, one for each PWM channel. So my questions are: a) is this the correct way to do shifted center-aligned on the 5606 and b) can I initialize the two counters differently before starting them to achieve the permanent shift, (one initialized at zero, the other initialized at MAX-50%)?
I'd been using the dsp56F805 which is better suited and easier to configure for PWM.