/* Configures the chopper mode feature for a timer.  */
void HRTIM_ChopperModeConfig(HRTIM_TypeDef *HRTIMx, uint32_t TimerIdx, HRTIM_ChopperModeCfgTypeDef *pChopperModeCfg)
/* Configures the chopper mode feature for a timer.  */
void HRTIM_ChopperModeConfig(HRTIM_TypeDef *HRTIMx, uint32_t TimerIdx, HRTIM_ChopperModeCfgTypeDef *pChopperModeCfg)
{
  uint32_t HRTIM_chpr;
  assert_param(IS_HRTIM_TIMING_UNIT(TimerIdx));
  HRTIM_chpr = HRTIMx->HRTIM_TIMERx[TimerIdx].CHPxR;
  HRTIM_chpr &= ~(HRTIM_CHPR_CARFRQ | HRTIM_CHPR_CARDTY | HRTIM_CHPR_STRPW);
  HRTIM_chpr |= pChopperModeCfg->CarrierFreq;
  HRTIM_chpr |= (pChopperModeCfg->DutyCycle << 4);
  HRTIM_chpr |= (pChopperModeCfg->StartPulse << 7);  
  HRTIMx->HRTIM_TIMERx[TimerIdx].CHPxR = HRTIM_chpr;
}