This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28388D: T-format example send different length data

Part Number: TMS320F28388D
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

  • Hi,

    Due to Thanksgiving Holiday, the subject matter expert is out of office. We will get back to you next week.

    Thanks & Regards,
    Santosh

  • Strong,

    If the delay that is commented out (line 22) is included, then is there any difference in the result? 

    Is there any pattern? For example does the first transmission send 10 bits but every transmission after send 7?

    There may be something in the CLB logic that isn't getting reset properly if the state machine doesn't go through a complete cycle. For example, if it is stuck in "WAIT_FOR_START" when the next command is loaded. The PM_tformat_setupCommandReadoutOrReset function calls a library function named tformat_resetCLB. This function resets the counters and GPREG input. Examining key CLB component outputs after this function is called (using the register window) may provide clues. 

  • Hi Lori,

    Yes, first send 10 bits, second send 7 bits, third send 10bits, fourth send 7bits again…

  • Thank you, Strong. I will look into this and get back to you within the week. 

    I suspect something is not getting back to the start state in the CLB. 

  • Strong,

    I was able to reproduce the issue.

    In the library there is a function called tformat_resetCLB()

    Add the two lines highlighted in yellow (CLB_disableCLB()  and  CLB_enableCLB())

    This will toggle the GLOBAL_EN bit for the tile. This bit acts as a soft reset for the tile. Make sure to rebuild the library and the communications demo. 

    Regards

    Lori