JAN HARMAN

TPM in Edge-aligned PWM Mode: Starting Duty Cycle

Discussion created by JAN HARMAN on Dec 1, 2010
Latest reply on Dec 1, 2010 by bigmac

Hello,

 

after setup TPM as Enge-aligned PWM generator to 100% duty cycle

 

 

// Edge-aligned PWM    TPM1C0SC = 0b00101000;  // Timer1 Ch0 configuration    TPM1C1SC = 0b00101000;  // Timer1 Ch1 configuration//               ||||||||//               ||||||++-- 00 (unused)//               |||||+---- ELSnA//               ||||+----- ELSnB//               |||+------ MSnA
//               ||+------- MSnB
//               |+-------- CHnIE (Chx int enable) 0=disable, 1=enable//               +--------- CHnF (Chx int flag)    TPM1MOD = MODULO_TPMVALUE_10MS;    // Value    TPM1C0V = MODULO_TPMVALUE_10MS+1;    TPM1C1V = MODULO_TPMVALUE_10MS+1;    TPM1SC = 0b00001100;//             ||||||||   //             |||||||+-- PS0 [PS2:PS1:PS0]://             ||||||+--- PS1 000=/1, 001=/2, 010=/4, 011=/8//             |||||+---- PS2 100=/16, 101=/32, 110=/64, 111=/128//             ||||+----- CLKSA
//             |||+------ CLKSB
//             ||+------- CPWMS
//             |+-------- TOIE (TOF int enable) 0=disable, 1=enable//             +--------- TOF (Timer overflow flag)

 

 

TPM generates one period with 0% duty cycle. Is it possible to supress this behaviour? I need to start with 100 % duty cycle.

 

Thanks a lot.

Jan

 


Outcomes