1、修改main.c的程序为:
#include "tle_device.h"
int main(void)
{
/*****************************************************************************
** initialization of the hardware modules based on the configuration done **
** by using the IFXConfigWizard **
*****************************************************************************/
TLE_Init();
BDRV_Set_Bridge(Ch_LS_En, Ch_On, Ch_LS_On, Ch_En);; //将LS2、HS1设置为ON,即打开LS2、HS1,将LS1、HS2设置为EN,不能将LS1、HS2分别设置为Ch_LS_Off、Ch_Off,这样会导致H桥无法正常工作。
for (;;)
{
(void)WDT1_Service(); //看门狗
}
}
2、此时GH1、GL2常通、GH2、GL1常闭
各引脚电压为:
V(gh1) = 24V, V(gh2) = 0V, V(gl1) = 0V, V(gl2) = 10V
V(sh1) = 12V, V(sh2) = 0V, V(sl) = 0V
各引脚的电压波形为:
GH2:
SH2:
GL2:
SL:
GL1:
SH1:
GH1: