Pwm_gs_PwmChannels[au8_PwmChannelId].u8_PwmChannel[0x04]

现场:

疑点:u8_PwmChannel 0x04 对应的clock为0

问题:1. Pwm_gs_PwmChannels value right?

           2. Pwm_gs_PwmChannels[PWM_CLOCK_A_CH_23]

in emios_cfg.h:

#define EMIOS_CHANNEL_SPINDLE_MOTOR_IH1                 EMIOS_CHANNEL_4                 /* To be used as OPWMB */

in Emios_def.h

#define EMIOS_CHANNEL_4                         4u

/**** type definitions and macros *********************************************/
/* Add the PWM channels required by the project to the enumeration list */


typedef enum
{
    PWM_SPINDLE_IH1,
    PWM_SPINDLE_IH2,
    PWM_SPINDLE_IL1,
    PWM_SPINDLE_IL2,
    PWM_MOTOR_B,
    PWM_BUZZER,    
 PWM_CLOCK_A_CH_23,  /* Provides clock to channels 17 and 18 for ADC CTU measurement. Not available to application */
    PWM_MAX_CHANNELS
}Pwm_ChannelIdT;

/* Get actual period of pwm channel */

lu16_Period = Emios_GetChannelB(0, Pwm_gs_PwmChannels[PWM_CLOCK_A_CH_23].u8_PwmChannel);

猜你喜欢

转载自www.cnblogs.com/dannykong/p/10860223.html