Thanks, fixed the above as well (#474).
Giovanni
[DONE] STM32F30x advanced timer center aligned PWM
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
-
tecnologic
- Posts: 124
- Joined: Tue Jan 10, 2012 8:42 am
- Has thanked: 21 times
- Been thanked: 5 times
Re: [DONE] STM32F30x advanced timer center aligned PWM
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
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
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [DONE] STM32F30x advanced timer center aligned PWM
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
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
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!!
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!!
-
tecnologic
- Posts: 124
- Joined: Tue Jan 10, 2012 8:42 am
- Has thanked: 21 times
- Been thanked: 5 times
Re: [DONE] STM32F30x advanced timer center aligned PWM
Hi for CR1 i do things like :
may be an config value is needed to support settings like centeraligned PWM.
regards
Tec
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