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.

LAUNCHXL-F28379D: TIDM-1011

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: TIDM-1011, C2000WARE

Hi experts,

    I use TIDM-1011&launchpad-f28379d  connected to a tamagawa TS5700N8401 abs-enc. run the sample project <tformat_f28379x_boostxl_posmgr_site2>.  The code stopped here:

   tformat_exCommands() ->  while(tformatData.dataReady != 1);

   Anything I can do to let this project run well?

   Thanks.

Nick

  • Nick, 

    If you monitor the DATA_OUT do you see any activity from the C2000?

    Regards

    Lori

  • Hi Lori,

    DAT- is yellow, DAT+ is Blue. I modifiy the code here:

    retval1 = PM_tformat_setupCommand (PM_TFORMAT_DATAID2, 0, 0, 0);
    PM_tformat_startOperation();
    while(tformatData.dataReady != 1)
    {
    retval1 = PM_tformat_setupCommand (PM_TFORMAT_DATAID2, 0, 0, 0);
    PM_tformat_startOperation();//{;}
    }

  • Nick,

    I suggest starting with the C28x signals and making sure they come out correctly.  Can you check what the waveform looks like with respect to TxEn and DATA_OUT and DATA_IN at the launchpad?  TxEn changes the direction of send/receive for DATA_IN/DATA_OUT.  You can tap these signals through the connectors on the bottom of the LaunchPAD. 

    If you see activity from the C28x but not the encoder, then the next thing is to check that the boosterpack is connected correctly and that the encoder is powered as required. 

    Regards

    Lori

  • Nick - I was wondering if you found the issue?

    -Lori

  • Hi Lori

        Sorry for the late reply. 

        No signal output at GPIO63&GPIO64 for ENC1_DI&DO. Only SPICLK at GPIO6 has a waveform. 

  • Nick,

    There will not be continuous toggle on these pins.   The F2837xD will send a command and then wait for the encoder to respond.

    You may have to trigger the scope for transition at that time and capture the waveform of the F2837xD sending the command on data out, along with the TxEn signal.

    Maybe, you can place a break point at start_operation() function call.  Set up the trigger and then run the code.

    To confirm, are you using the t-format project from the C2000 Motor Control SDK? (https://www.ti.com/tool/C2000WARE-MOTORCONTROL-SDK)  I ask because there was an old release in C2000Ware that should no longer be used.  

    Regards

    Lori

  • Hi Lori,

    This is the project I used : \C2000Ware_MotorControl_SDK_3_00_01_00\solutions\boostxl_posmgr\f2837xd\ccs\tformat. 

    I add these blue codes that the board will send SPI continuously. 

    retval1 = PM_tformat_setupCommand (PM_TFORMAT_DATAID2, 0, 0, 0);
    PM_tformat_startOperation();
    while(tformatData.dataReady != 1)
    {
    retval1 = PM_tformat_setupCommand (PM_TFORMAT_DATAID2, 0, 0, 0);
    PM_tformat_startOperation();//{;}
    }

  • Nick,

    I would leave some delay between commands in order to let one finish before the next starts.  

    Something like:

     // retVal1 = tformat_exCommands();    <-- comment this out
    
    
    
    while(1)
        {
            retVal1 = PM_tformat_setupCommand (PM_TFORMAT_DATAID3, 0, 0, 0);
            PM_tformat_startOperation();
            DEVICE_DELAY_US(10L);          <-- some delay 
        }

    Monitor GPIO9 which is the TxEn pin along with GPIO64 (SOMI) and I've also monitored GPIO7 (clock slave).   My goal is to see if one of the pins is not toggling and if so then investigate if something on the board could be holding it.  Maybe a jumper on the board, as an example.

    It should look like this:

  • Hi Lori,

    Here is the waveform I got.  EN & CLK looks OK. But no MOSI&MISO.

    And where can I find the code about how to operate SPI? I want to try to send some normal spi data to the pins.

  • There are SPI examples in C2000Ware under the directory:

    C:\ti\c2000\C2000Ware<version>\driverlib\f2837xd\examples\cpu1\spi

    Best Regards

    Lori

  • Hi Lori,

      I tried the samples you mentioned, SPI works well.  I changed the spi pins to GPIO63/64/65/66, it can also  send out data correctly.

      I found that these four samples call SPI_Config() function, but no such code in T-format example. Should I call it manually? Or it has been called in T-format lib?

      And, GPIO64 is SOMI, Did you connect launchpad to a encoder so that GPIO64 has waveform in your last reply? GPIO9 and GPIO7 are the same as yours.

      Thanks a lot for your patient!

      Nick

  • Hi Lori,

        I connect TIDM-1011 to launchPad. GPIO63 has data now just the same as yours. And I add repeat code follow all the "while(tformatData.dataReady != 1)" code. It seems work normal now. But many CRC error. I will test more to get a result. maybe I need to change another encoder.

        Thanks for your patient and your help!

        Nick.

  • Nick

    I've seen CRC errors when there is noise in the hardware system.  If you have scope probes connected make sure there is a solid ground connection from the probes to the the LaunchPad and TIDM.  

    I am going to close this case.  If you have a follow-up it will automatically reopen or you can post a new question.  

    Best Regards

    Lori