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.

FSI example fsi_ex16_daisy_handshake fails when using FSI_DATA_WIDTH_2_LANE

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hi,

I'm new to the F28388D, exploring several peripherals. Currently I'm testing the FSI using 2 F28388D ControlCards with the FSI interface boards. I programmed the flash of one of the boards with the fsi_ex16_daisy_handshake_node example, and on the other one I run the fsi_ex16_daisy_handshake_lead example in the debugger. For both ones I used these settings:

#define FSI_DMA_ENABLE              1
#define TX_DMA_TRIGGER_ENABLE       0
#define PRESCALER_VAL    FSI_PRESCALE_50MHZ
FSI_DataWidth nLanes = FSI_DATA_WIDTH_1_LANE;

And this is working just fine, I can see GPIO16 toggling on both devices.

However when I only change nLanes to FSI_DATA_WIDTH_2_LANE in both examples it doesn't work anymore. The code ends up at ESTOP0 in fsiRxInt2ISR(), and then at ESTOP0 in the main while loop.

What could be the cause? Do I have to make any other code (or hardware) changes when switching to 2 lanes?

Thank you,
Arjan

  • Hi Arjan,

    Which C2000ware version are you using? There's a bug in 3_02_00_00 related to the FSI_RX1A GPIO configuration for the F2838x ControlCard.

    Please check the device.h file included in your project for the line of code below. It should be changed to GPIO_10 not GPIO_11 to match the signals on the ControlCard.

    #define DEVICE_GPIO_CFG_FSI_RX1A        GPIO_10_FSIRXA_D1   // "pinConfig" for FSI RX1A

    Best,

    Kevin

  • Hi Kevin,

    I'm using C2000Ware 3_03_00_00, and these are the FSI definitions in my device.h:

    //
    // FSI
    //
    #define DEVICE_GPIO_PIN_FSI_RXCLKA      9U  // GPIO number for FSI RXCLKA
    #define DEVICE_GPIO_PIN_FSI_RX0A        8U  // GPIO number for FSI RX0A
    #define DEVICE_GPIO_PIN_FSI_RX1A        10U  // GPIO number for FSI RX1A

    #define DEVICE_GPIO_PIN_FSI_RXCLKB      60U  // GPIO number for FSI RXCLKB
    #define DEVICE_GPIO_PIN_FSI_RX0B        58U  // GPIO number for FSI RX0B
    #define DEVICE_GPIO_PIN_FSI_RX1B        59U  // GPIO number for FSI RX1B

    #define DEVICE_GPIO_PIN_FSI_RXCLKC      14U  // GPIO number for FSI RXCLKC
    #define DEVICE_GPIO_PIN_FSI_RX0C        12U  // GPIO number for FSI RX0C
    #define DEVICE_GPIO_PIN_FSI_RX1C        13U  // GPIO number for FSI RX1C


    #define DEVICE_GPIO_CFG_FSI_TXCLK       GPIO_27_FSITXA_CLK  // "pinConfig" for FSI TXCLK
    #define DEVICE_GPIO_CFG_FSI_TX0         GPIO_26_FSITXA_D0   // "pinConfig" for FSI TX0
    #define DEVICE_GPIO_CFG_FSI_TX1         GPIO_25_FSITXA_D1   // "pinConfig" for FSI TX1

    #define DEVICE_GPIO_CFG_FSI_RXCLKA      GPIO_9_FSIRXA_CLK   // "pinConfig" for FSI RXCLKA
    #define DEVICE_GPIO_CFG_FSI_RX0A        GPIO_8_FSIRXA_D0    // "pinConfig" for FSI RX0A
    #define DEVICE_GPIO_CFG_FSI_RX1A        GPIO_10_FSIRXA_D1   // "pinConfig" for FSI RX1A

    #define DEVICE_GPIO_CFG_FSI_RXCLKB      GPIO_60_FSIRXB_CLK  // "pinConfig" for FSI RXCLKB
    #define DEVICE_GPIO_CFG_FSI_RX0B        GPIO_58_FSIRXB_D0   // "pinConfig" for FSI RX0B
    #define DEVICE_GPIO_CFG_FSI_RX1B        GPIO_59_FSIRXB_D1   // "pinConfig" for FSI RX1B

    #define DEVICE_GPIO_CFG_FSI_RXCLKC      GPIO_14_FSIRXC_CLK  // "pinConfig" for FSI RXCLKC
    #define DEVICE_GPIO_CFG_FSI_RX0C        GPIO_12_FSIRXC_D0   // "pinConfig" for FSI RX0C
    #define DEVICE_GPIO_CFG_FSI_RX1C        GPIO_13_FSIRXC_D1   // "pinConfig" for FSI RX1C

    So it's already set to GPIO10.

    Kind regards,
    Arjan

  • Hi Arjan,

    Those definitions are correct, it was corrected in 3_03_00_00.

    What FSI clock speed do you have configured? Can you try using a slower FSI clock speed and see if that works? Configure this using the PRESCALER_VAL and defines below:

    #define PRESCALER_VAL   FSI_PRESCALE_50MHZ
    
    //
    //  Defines for setting FSI clock speeds
    //
    #define FSI_PRESCALE_50MHZ          2U
    #define FSI_PRESCALE_25MHZ          4U
    #define FSI_PRESCALE_10MHZ          10U
    #define FSI_PRESCALE_5MHZ           20U

    Best,

    Kevin

  • Hi Kevin,

    When I use FSI_PRESCALE_25MHZ it's working OK!

    When using FSI_PRESCALE_50MHZ I notice the handshake sequence is done OK,and after that it fails like I described earlier. Do I need to do any tweaking in the register settings to make it work? I'm using standard eval hardware so that shouldn't be a problem.

    Kind regards,
    Arjan

  • Hi Arjan,

    Kevin is the expert here & he is unfortunately away from work today.  He'll check back here tomorrow.

    It looks to me like you are successfully receiving data across 2 lines, it is just not consistently doing so without generating errors (notice that dataFrameCntr is non-zer)o.  So here are some things I might look at:
    1) Ensure that your connections & cabling are secure.  The picture of your setup looks pretty robust, but I'd recommend taking another look at it to make sure.
    2) It may be possible that your setup is creating skew between the clock and the data1 lines.  The good news is that this peripheral is designed to be able to compensate for this skew.  It may be worth taking a look at the following appnote and running the related example project:  https://www.ti.com/lit/spracj9  This may not be the issue, but it should be relative easy to check.

    Again Kevin may have more (and perhaps better) ideas for you tomorrow.  Good luck in your project!


    Thank you,
    Brett

  • Thanks Brett.

    I read the appnote, will try the example projects.

    I was just thinking about the practical implications when using this in our projects. The F28388D would be used on a control board for a power module, linking several power modules via FSI. The number of power modules and the length of the cables would vary per project, but the power modules themselves (incl the control boards) would always be the same.

    Would the skew calibration need to be done per project/configuration only? Or would it need to be done for each individual board due to hardware tolerances? Would it be possible to always perform an automatic calibration at board startup (I noticed the FSI_DELAY_LINE_CALIBRATION_ENABLE TODO definition in the fsi examples)?

    Kind regards,
    Arjan

  • Hi Arjan,

    Along with what Brett mentioned you can also try removing the resistors shown below on your ControlCard to remove some of the extra trace length to the docking station. Also, trying a different CAT5 cable may work at 50 MHz, if you have any spares lying around. I'd probably try this before diving too deep into the skew compensation material.

    One thing to note is that isolation and differential devices may induce channel-to-channel skew and could vary from part-to-part.

    Best,

    Kevin