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.

TMS320F28379D: How to Modify the Routines in the Design DRIVE Development Kit IDDK - TMDXIDDK379D to Use SFRA Features ?

Part Number: TMS320F28379D
Other Parts Discussed in Thread: TMDXIDDK379D, SFRA

Hi,

Ti friends!

  The board type used by the customer is IDDK - TMDXIDDK379D and is testing Level6-SFRA functionality. Configure the SCI as described in the SFRA guide:
But found that it doesn't seem to work, how should the SCI initialisation be further modified?

void sci_init(void)
{

GPIO_setMasterCore(DEVICE_GPIO_PIN_SCIRXDA, GPIO_CORE_CPU1);
GPIO_setPinConfig(DEVICE_GPIO_CFG_SCIRXDA);
GPIO_setDirectionMode(DEVICE_GPIO_PIN_SCIRXDA, GPIO_DIR_MODE_IN);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SCIRXDA, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCIRXDA, GPIO_QUAL_ASYNC);

//
// Configuration for the SCI Tx pin.
//
GPIO_setMasterCore(DEVICE_GPIO_PIN_SCITXDA, GPIO_CORE_CPU1);
GPIO_setPinConfig(DEVICE_GPIO_CFG_SCITXDA);
GPIO_setDirectionMode(DEVICE_GPIO_PIN_SCITXDA, GPIO_DIR_MODE_OUT);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SCITXDA, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCITXDA, GPIO_QUAL_ASYNC);

SCI_performSoftwareReset(SCIA_BASE);

//
// Configure SCIA for echoback.
//
SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, 4000000, (SCI_CONFIG_WLEN_8 |
SCI_CONFIG_STOP_ONE |
SCI_CONFIG_PAR_NONE));
SCI_resetChannels(SCIA_BASE);
SCI_resetRxFIFO(SCIA_BASE);
SCI_resetTxFIFO(SCIA_BASE);
SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_TXFF | SCI_INT_RXFF);
SCI_enableFIFO(SCIA_BASE);
SCI_enableModule(SCIA_BASE);
SCI_performSoftwareReset(SCIA_BASE);

}


  Many thanks!

  • Hi,

    I had thought that the Build Level 6 software already supports SFRA and they shouldn't need to add / edit the code for this. What behavior are they seeing with the default project? Can they not connect using the SFRA GUI tool?

    One thing they may need to check is the switch positions on the ControlCARD to enable SCI signal connection to the debug probe --> USB cable connection.

    Best,

    Kevin

  • This is the part where they added the initialisation procedure for the SCI, in the original official journey the customer said they could not find the relevant SCI initialisation procedure and it was in the SFRA guide instruction manual so they thought they needed to add it, but after adding it they still couldn't connect to the gui correctly.
    So there is no need to add this part of the SCI initialisation code?

    Thanks!

  • And what puzzles us even more at the moment is that in the test of Level4, by adjusting the current speed double closed loop can run well, when I change Level4 to Level6, the motor stops running, and the Run motor logo automatically changes to stop, not letting us control the motor to run, don't know why?

  • Hi Bob,

    Yes, it's already added for BL#6. See below function and sub-functions in 'fcl_f2837x_tmdxiddk.c' file.

        // *************** SFRA & SFRA_GUI COMM INIT CODE START *******************
    #if(BUILDLEVEL == FCL_LEVEL6)
        // ************************************************************************
        // NOTE:
        // =====
        // In configureSFRA() below, use 'SFRA_GUI_PLOT_GH_H' to get open loop and
        // plant Bode plots using SFRA_GUI and open loop and closed loop Bode plots
        // using SFRA_GUI_MC. 'SFRA_GUI_PLOT_GH_CL' gives same plots for both GUIs.
        // The CL plot inferences shown in SFRA_GUI is not according to
        // NEMA ICS16 or GBT-16439-2009, so it is not recommended for bandwidth
        // determination purposes in servo drive evaluations. Use SFRA_GUI_MC for
        // that. Recommended to use the default setting (SFRA_GUI_PLOT_GH_H).
        // ************************************************************************
        //
        // configure the SFRA module. SFRA module and settings found in
        // fcl_f2838x_sfra_gui.c/.h
        //
    
        // Plot GH & H plots using SFRA_GUI, GH & CL plots using SFRA_GUI_MC
        configureSFRA(SFRA_GUI_PLOT_GH_H, SAMPLING_FREQ);

    Did they verify their controlCard is set-up properly for SCI usage to PC?

    when I change Level4 to Level6, the motor stops running, and the Run motor logo automatically changes to stop, not letting us control the motor to run,

    Not sure about this currently. The ramp generator usage / motor start-up looks like it may be different from the block diagrams in https://www.ti.com/lit/spracl1 however.

    Best,

    Kevin