请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
部件号:LAUNCHTXL-F2.8069万M 您好,
我想使用外部频闪灯信号来初始化eQEP编码器。 项目基于lab13e。 我有一个问题,即在 频闪动事件中,电机有时会产生巨大的抖动,电机停止移动。
初始化eQEP的代码来自实验室
//将计数器置于RESET QEP_RESET_counter(obj->qepHandle[QEP]); //设置QPOSINIT寄存器 QEP_set_posn_init_count(obj->qepHandle[QEP],0); //禁用所有中断QEP_disable_all_Handle(Qeple_Handle_rema_eple_rebers_qep_rebers_qep_qep_qep_rebers_qep_qep_reposle[QEP] 中断Qeple_rebers_qep_qep_reposle_qep_reposle[qep_reposle_reposle_qep_reposle_qep_reposle_reposle_qep_reposle_reposle_reposle_reposle_rebers_qep_qep_qep_qep_qep_reposle_rebers_qep_qep_rebers qep_disable_gate_index(obj->qepHandle[QEP]); qep_set_ext_clock_rate (obj->qepHandle[QEP],QEP_Xcr_2x_RES); qep_set_a_polarity (obj->qepHandle[QEP],QEP_QAP_No_Effect); QEP_Set_B_POLICITY (obj->qepHandle[QEP],QEP_QBP_No_Effect); QEP_Set_index_POLICITY (obj->qepHandle[QEP],QEP_QIP_No_Effect); QEP_Set_strobe_obj (EP->qepHandle[QEP], QEP_QSP_No_effect); //设置QEPCTL寄存器 QEP_set_emu_control(obj->qepHandle[QEP],QEPCTL_Freesoft_ineve_halt); QEP_set_posn_count_reset_mode(obj->qepHandle[QEP],QEPTL_Reset_EP_Elet,QEP_RES_RES_RES_RES_RESET_ENT_RES_ENTR_RESET_EN_EN_ENTR_RES_RESET_DEP- QEPCTL_Sei_Rising Falling_Edge_Init); QEP_Set_index_event_init (obj->qepHandle[QEP],QEPCTL_IEI_Nothing); // QEP_Set_index_event_latch (obj->qepHandle[QEP],QEPCTL_IEL_Rising _Edge); qep_set_strobe_event_latch(obj->qepHandle[QEP],QEPCTL_Sel_Rising _Falling_Edge); qep_set_soft_init(obj->qepHandle[QEP],QEPCTL_Swi_Noth);qep_disable_unit_Fall_timer(obj->qeptimer[QEP] qep_disable_watchdog (obj->qepHandle[QEP]); //设置QPOSCTL寄存器 qep_disable_posn_compare(obj->qepHandle[QEP]); //设置QCAPCTL寄存器 qep_disable_capture (ep->qepHandle[QEP]); //