主题中讨论的其他部件:MOTORWARE, controlSUITE
Brett,您好!
我在我的项目中使用F2.8055万作为通信控制器。 使用3个SCI端口。 我为这3个SCI端口设置相同的工作模式并设置回路测试。 SCIA工作正常,但SCIB和SCIC无法正常工作。 在我向TX缓冲区发送字节日期后,程序始终等待Rx数据就绪。 你能告诉我是什么造成了这种情况吗? CCS版本是6.1 .2。 测试代码来自 \ti\motorware_1_01_00_17\sw\solutions\instaspin_ince\boards\drv8312kit_revD\F28x\f2805xF\projects\ccs5\proj_lab01,2805,SCI设置函数AS
void HAL_setupSCIs (HAL_HANDLE句柄)
{
HAL_Obj *OBJ =(HAL_Obj *)句柄;
//A端口
Sci_setNumStopBits(obj->sciHandle[0],SCI_NumStopBits_one);
sci_disableParity(obj->sciHandle[0]);
Sci_setCharLength (obj->sciHandle[0],SCI_CharLength _8_Bits);
sci_enablerx(obj->sciHandle[0]);
sci_enableTx (obj->sciHandle[0]);
Sci_setBaudRate(obj->sciHandle[0],SCI_baudrate_9_6_kBaud);//Baud 9.6 * 4 = 38.4kBaud
//SCI_enableRxInt(obj->sciHandle[0]);
sci_enableLoopBack(obj->sciHandle[0]);//设置环回以进行测试
sci_enable(obj->sciHandle[0]);
//B端口
Sci_setNumStopBits(obj->sciHandle[1],SCI_NumStopBits_one);
sci_disableParity(obj->sciHandle[1];
Sci_setCharLength (obj->sciHandle[1],SCI_CharLength _8_Bits);
sci_enablerx(obj->sciHandle[1]);
sci_enableTx (obj->sciHandle[1]);
Sci_setBaudRate(obj->sciHandle[1],SCI_baudrate_9_6_kBaud);//Baud 9.6 * 4 = 38.4kBaud
//SCI_enableRxInt(obj->sciHandle[1]);
sci_enableLoopBack(obj->sciHandle[1]);//设置环回以进行测试
sci_enable(obj->sciHandle[1]);
//C端口
Sci_setNumStopBits(obj->sciHandle[2],SCI_NumStopBits_one);
sci_disableParity(obj->sciHandle[2]);
Sci_setCharLength (obj->sciHandle[2],SCI_CharLength _8_Bits);
sci_enablerx(obj->sciHandle[2]);
sci_enableTx (obj->sciHandle[2]);
Sci_setBaudRate(obj->sciHandle[2],SCI_Baudrate_9_6_kBaud);//Baud 9.6 * 4 = 38.4kBaud
//SCI_enableRxInt(obj->sciHandle[2]);
sci_enableLoopBack(obj->sciHandle[2]);//设置环回以进行测试
sci_enable(obj->sciHandle[2]);
返回;
}
GPIO定义为
// SCI-RX-DA-X
GPIO设置模式(obj->gpioHandle, GPIO编号_28, GPIO 28模式_SCIRXDA);
GPIO _setPullup(obj->gpioHandle, GPIO编号_28, GPIO _Pullup_Enable);
GPIO _setQualification (obj->gpioHandle,GPIO编号_28,GPIO Qual_Async);
// SCI-TX-DA-X
GPIO设置模式(obj->gpioHandle, GPIO编号_29, GPIO 29_Mode_SCITXDA);
GPIO_setPullup(obj->gpioHandle, GPIO编号_29, GPIO_Pullup_Enable);
// SCI-TX-DB-Y
GPIO设置模式(obj->gpioHandle,GPIO编号_14,GPIO 14_Mode_SCITXDB);
GPIO _setPullup(obj->gpioHandle, GPIO编号_14, GPIO _Pullup_Enable);
// SCI-RX-DB-Y
GPIO _setMode(obj->gpioHandle,GPIO编号_15,GPIO _15_Mode_SCIRXDB);
GPIO _setPullup(obj->gpioHandle, GPIO编号_15, GPIO _Pullup_Enable);
GPIO _setQualification (obj->gpioHandle,GPIO编号_15,GPIO Qual_Async);
// SCI-RX-DC-Z
GPIO_setMode(obj->gpioHandle,gPIO_NUMBER_26,gPIO_26_Mode_SCIRXDC);
GPIO _setPullup(obj->gpioHandle, GPIO编号_26, GPIO _Pullup_Enable);
GPIO _setQualification (obj->gpioHandle,GPIO编号_26,GPIO Qual_Async);
// SCI-TX-DC-Z
GPIO_setMode(obj->gpioHandle,gPIO_NUMBER_27,gPIO_27_Mode_SCITXDC);
GPIO _setPullup(obj->gpioHandle,GPIO编号_27,GPIO _Pullup_Enable);
非常感谢
Winston