HC32F460_DDL_Rev3.0.0.zip
2022-8-5 10:15 上传
点击文件名下载附件
25.13 MB, 下载次数: 160
XHSC XHCode Setup V0.02.zip
2022-8-12 16:51 上传
36.6 MB, 下载次数: 339
收藏3 举报
/* PA15 set to GPIO-Output */ GPIO_REG_Unlock(); GPIO_SetDebugPort(GPIO_PIN_TDI, DISABLE); GPIO_REG_Lock(); (void)GPIO_StructInit(&stcGpioInit); stcGpioInit.u16PinDir = PIN_DIR_OUT; stcGpioInit.u16PinAttr = PIN_ATTR_DIGITAL; (void)GPIO_Init(GPIO_PORT_A, GPIO_PIN_15, &stcGpioInit);
/* USER CODE BEGIN PV */ /* USER CODE END PV */
zhxlx 发表于 2022-8-6 12:19 5、源代码中,INT_IRQn产生错误,配置中已经有向量号了,为啥没有配置出来呢?
stcIrq.enIntSrc = INT_SRC_TMR0_2_CMP_A; stcIrq.enIRQn = INT_IRQn; stcIrq.pfnCallback = &INT_SRC_TMR0_2_CMP_A_IrqCallback; (void)INTC_IrqSignIn(&stcIrq); NVIC_ClearPendingIRQ(INT_IRQn); NVIC_SetPriority(INT_IRQn, DDL_IRQ_PRIO_15); NVIC_EnableIRQ(INT_IRQn);
/** * [url=home.php?mod=space&uid=247401]@brief[/url] TMRA PWM configuration structure. */ typedef struct { uint32_t u32CompareValue; /*!< Specifies compare value of the TMRA channel. This parameter can be a number between: 0UL and 0xFFFFFFFFUL for TimerA1 and TimerA2 of HC32F472. 0UL and 0xFFFFUL for TimerA3/4/5/6 of HC32F472 and all TimerA units of other MCUs. */ uint16_t u16StartPolarity; /*!< Specifies the polarity when the counter start counting. This parameter can be a value of [url=home.php?mod=space&uid=144993]@ref[/url] TMRA_PWM_Polarity NOTE: CAN NOT be specified as TMRA_PWM_LOW or TMRA_PWM_HIGH when sw_count.u16ClockDiv of [url=home.php?mod=space&uid=144993]@ref[/url] stc_tmra_init_t is NOT specified as @ref TMRA_CLK_DIV1 */ uint16_t u16StopPolarity; /*!< Specifies the polarity when the counter stop counting. This parameter can be a value of @ref TMRA_PWM_Polarity */ uint16_t u16CompareMatchPolarity; /*!< Specifies the polarity when the counter matches the compare register. This parameter can be a value of @ref TMRA_PWM_Polarity */ uint16_t u16PeriodMatchPolarity; /*!< Specifies the polarity when the counter matches the period register. This parameter can be a value of @ref TMRA_PWM_Polarity */ } stc_tmra_pwm_init_t; /************************* Configure TMRA_2_2 CMP ***************************/ /* Config PWM output */ (void)TMRA_PWM_StructInit(&stcPwmInit); stcPwmInit.u16CompareValue = 0xFFFFU; stcPwmInit.u16StartPolarity = TMRA_PWM_HOLD; stcPwmInit.u16StopPolarity = TMRA_PWM_LOW; stcPwmInit.u16CompareMatchPolarity = TMRA_PWM_LOW; stcPwmInit.u16PeriodMatchPolarity = TMRA_PWM_LOW; (void)TMRA_PWM_Init(CM_TMRA_2, TMRA_CH2, &stcPwmInit);
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页
等级类勋章
发帖类勋章
时间类勋章
人才类勋章
2285
8273
290
扫码关注 21ic 官方微信
扫码关注嵌入式微处理器
扫码关注电源系统设计
扫码关注21ic项目外包
扫码浏览21ic手机版
本站介绍 | 申请友情链接 | 欢迎投稿 | 隐私声明 | 广告业务 | 网站地图 | 联系我们 | 诚聘英才
京公网安备 11010802024343号