现场:

 

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

疑点: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);

 

 Pwm_gs_PwmChannels[au8_PwmChannelId].u8_PwmChannel[0x04] 随笔

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄