Page 3 of 3

Re: [DONE] STM32F30x advanced timer center aligned PWM

Posted: Tue Mar 18, 2014 11:58 am
by Giovanni
Thanks, fixed the above as well (#474).

Giovanni

Re: [DONE] STM32F30x advanced timer center aligned PWM

Posted: Tue Mar 18, 2014 3:41 pm
by tecnologic
Hi Giovanni,

do you have any idea how to read the register values of the F30x cause Embedded Register view does not support this cpu.

If not i have to read them to a copy of the structure from the ST header. what a pain in the ass.

Regards

Tec

Re: [DONE] STM32F30x advanced timer center aligned PWM

Posted: Tue Mar 18, 2014 6:09 pm
by Giovanni
Hi,

The XXXDriver structure has usually a pointer to the peripheral registers block, you can use the Eclipse Expressions view and reach the peripheral through the pointer. Use PWMD1 as expression for example.

Giovanni

Re: [DONE] STM32F30x advanced timer center aligned PWM

Posted: Mon Dec 15, 2014 11:29 pm
by hkerner
Hi everyone,

I was wondering if there is a straightforward way now to set the bits in the CR1 register for TIM3 and TIM4 on STM32F4, or should I just do:

TIM4->CR1 |= ... ?

Also wondering what the defaults are for CR1. Thank you!!

Re: [DONE] STM32F30x advanced timer center aligned PWM

Posted: Tue Dec 16, 2014 8:51 am
by tecnologic
Hi for CR1 i do things like :

Code: Select all

 // Start timer
   pwmStart(pwmp, &pwmcfg);
   /*
    * Setup the timer in center aligned mode.
    * The interrupt flags for pwmpcb function call are
    * only set when up counting. With the duty at nearly 100%
    * we pre trigger the adc from this int by 100%-duty%
    */
   (pwmp)->tim->CR1 |= STM32_TIM_CR1_CMS(2);


may be an config value is needed to support settings like centeraligned PWM.

regards

Tec