Page 1 of 1

Problem in PWM: PWM_OUTPUT_MASK

Posted: Wed Dec 12, 2012 11:25 am
by oattao
Hi all,
I'm using PWM in STM32. I read in pwm.h file:

Code: Select all

/**
 * @brief   Standard output modes mask.
 */
#define PWM_OUTPUT_MASK                         0x0F

I don't understand the "output modes mask" of PWM. Please explain to me.
Thanks in advance.

Re: Problem in PWM: PWM_OUTPUT_MASK

Posted: Wed Dec 12, 2012 11:59 am
by Giovanni
Hi,

It is not an actual mode, it is the mask of the bits reserved for the output mode in that word (4 bits), an AND operation with that constant allows to isolate the actual mode.

Giovanni