Other Parts Discussed in Thread: C2000WARE
Hi Expert,
The T-format example was used to do the test by F28388 controlcard, without connection to position manager board, just test the SPI TX waveform by do a little modification of the example code to send data in while loop below:
sometimes the waveform that send 10 bits is correct, but sometimes send 7 bits which is not correct.
what customer's expect is always send 10 bits even though there is no received data from encoder, any suggestion for this to send 10 bits data always?
C:\ti\c2000\C2000Ware_MotorControl_SDK_4_01_00_00\solutions\boostxl_posmgr\f2838x\source\pm_tformat_main.c


void
tformat_exCommands(void)
{
#if 1
while(1)
{
#if TFORMAT_RUN_ID3
commandData = (struct PM_tformat_commandStruct) {0};
tformatData = (struct PM_tformat_DataStruct) {0};
commandData.controlField = PM_TFORMAT_CFID3;
// DEVICE_DELAY_US(TFORMAT_IDLE_DELAY_US_START
// + TFORMAT_IDLE_DELAY_US_INCREMENT);
DEVICE_DELAY_US(60);
PM_tformat_setupCommandReadoutOrReset(PM_TFORMAT_ID3,
PM_TFORMAT_RX_CLOCKS_ID3,
PM_TFORMAT_RX_FIELDS_ID3,
PM_TFORMAT_TX_CLOCKS_ID3,
PM_TFORMAT_FIFO_LEVEL_ID3);
PM_tformat_startOperation();
//--------------------------------------------------------------------------
// DEVICE_DELAY_US(60000);
//--------------------------------------------------------------------------
PM_tformat_receiveDataID3();
if(tformat_checkError(PM_TFORMAT_CFID3) == PM_TFORMAT_PASS)
{
encoderData.position =
PM_tformat_updatePositionOrTurns(tformatData.dataField0,
tformatData.dataField1,
tformatData.dataField2);
encoderData.turns =
PM_tformat_updatePositionOrTurns(tformatData.dataField4,
tformatData.dataField5,
tformatData.dataField6);
encoderData.id =
PM_tformat_updateEncoderID(tformatData.dataField3);
}
#endif
}
#endif
