Problem in PWM: PWM_OUTPUT_MASK

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
oattao
Posts: 9
Joined: Mon Dec 03, 2012 5:04 am

Problem in PWM: PWM_OUTPUT_MASK

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Problem in PWM: PWM_OUTPUT_MASK

Post 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
Post Reply