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.

TMS320F28377D: How to connect to SFRA_GUI

Part Number: TMS320F28377D
Other Parts Discussed in Thread: SFRA, TMS320F28377S, TIDM-DC-DC-BUCK, LAUNCHXL-F280049C

Hi,

Recently I want to use SFRA to measure the transfer function of the loop.But first, I can't connect to SFRA_ GUI.The following are some programs of the serial port I configured:

// GPIO28 is the SCI Rx pin.
//
GPIO_setMasterCore(28, GPIO_CORE_CPU1);//
GPIO_setDirectionMode(GPIO_PIN_SCIA_RX, GPIO_DIR_MODE_IN);
GPIO_setPadConfig(GPIO_PIN_SCIA_RX, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(GPIO_PIN_SCIA_RX, GPIO_QUAL_ASYNC);
//
// GPIO29 is the SCI Tx pin.
//
GPIO_setMasterCore(29, GPIO_CORE_CPU1);//
GPIO_setDirectionMode(GPIO_PIN_SCIA_TX, GPIO_DIR_MODE_OUT);
GPIO_setPadConfig(GPIO_PIN_SCIA_TX, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(GPIO_PIN_SCIA_TX, GPIO_QUAL_ASYNC);

SCIA_Init(15000000, 57600);

void SCIA_Init(long SCI_VBUS_CLOCKRATE, long SCI_BAUDRATE)
{
// Note: Assumes Clocks to SCIA are turned on in InitSysCtrl()
// Note: Assumes GPIO pins for SCIA are configured to Primary function

int16_t j = 0;

SciaRegs.SCICCR.all =0x0007; // 1 stop bit, No loopback
// No parity,8 char bits,
// async mode, idle-line protocol
SciaRegs.SCICTL1.all =0x0003; // enable TX, RX, internal SCICLK,
// Disable RX ERR, SLEEP, TXWAKE
SciaRegs.SCICTL2.all =0x0003;
SciaRegs.SCICTL2.bit.TXINTENA =0;
SciaRegs.SCICTL2.bit.RXBKINTENA =0;
SciaRegs.SCIHBAUD =0x0000;

SciaRegs.SCILBAUD = (SCI_VBUS_CLOCKRATE/(8*SCI_BAUDRATE))-1;//0x0020; // 20h = 57.6Kbaud @ LSPCLK = 60/4 MHz

SciaRegs.SCICTL1.all =0x0023; // Relinquish SCI from Reset

//SciaRegs.SCIFFTX.all=0xE040; // ENable FIFO enhancement
SciaRegs.SCIFFTX.all=0x8040; // DISable FIFO enhancement
SciaRegs.SCIFFRX.all=0x204f;
SciaRegs.SCIFFCT.all=0x0;
SciaRegs.SCIPRI.bit.SOFT=0x0;
SciaRegs.SCIPRI.bit.FREE=0x1;

RcvTaskPointer = &GetCmdByte; // Initialize the CmdPacket Rcv Handler state machine ptr
RcvTskPtrShdw = 1; // DEBUG
SendTaskPtr = 0; // Init to 1st state
LowByteFlag = 1; // Start with LSB during Byte-to-Word packing

dataOut16 = 0;
dataOut32 = 0;

*memDataPtr16 = 0;
*memDataPtr32 = 0;

RcvTskPtrShdw = 0; // for debug

delayer = 0;

MemGetPtr = 0;
MemGetAddress = 0x00000000;
MemGetAmount = 0;

MemSetPtr = 0;
MemSetValue = 0x00000000;

// clear Command Packet
for (j=0; j<PktSize; j++)
{
CmdPacket[j] = 0x0;
}

j=0;

// init all dispatch Tasks
CmdDispatcher[0] = LifePulseTsk;
CmdDispatcher[1] = TextSet;
CmdDispatcher[2] = ButtonSet;
CmdDispatcher[3] = SliderSet;
CmdDispatcher[4] = VariableGet;
CmdDispatcher[5] = ArrayGet;
CmdDispatcher[6] = DataGet;
CmdDispatcher[7] = DataSet32;
CmdDispatcher[8] = SpareTsk08;

}

There is an option Boot on Connect on the interface for selecting serial ports. I don't know what this option means.

In addition, can you provide some SFRA examples for TMS320F28377S? I only found some examples of F28004x on the official website.

Thank you for reading my question.

  • Only this example I can find for 28377:

    TIDM-HV-1PH-DCAC-Single Phase Grid Connected Inverter

    But I can't understand this graphical configuration.

  • Hi Tingting,

    For how to setup SFRA, please refer to this document: https://www.ti.com/lit/spruik4 (3.4.4)

    It looks like that you did not set the pinmux setting of the SCI GPIO to SCI mode. Also it seems you are mixing driverlib and bitfield programming style, which will work but not recommended.

    I cannot find a good example for SFRA on F2837xD, but you can refer to example project such as TIDM-DC-DC-BUCK in digital power SDK. Since it is all in driverlib, migration between device family is smooth and code can be reuse.

    Han

  • Hi Han,

    Thank you for reply. I used the TIDM-DC-DC-BUCK example,and I have a LAUNCHXL-F280049C,I downloaded the example.The schematic diagram ofLAUNCHXL-F280049C  is as follows:

    GPIO 28 and GPIO 29 are Communication serial ports,I connected them to a USB to TTL module, and then connected them to my computer USB.Then I set the baud rate of the SFRA GUI to 57600 and selected the corresponding communication serial port, but it still cannot be connected. Can you tell me the possible reasons?

    Thank you very much for your help, and I look forward to your reply.

    Tingting

  • Tingting,

    LAUNCHXL-F280049C board have a FTDI chip built in to allow a UART channel in the same USB port for JTAG connection. There are a set of switches to set how the serial port is routed on the board. By default, GPIO 28/29 is routed to the built-in virtual COM port via USB. That is the port we normally use for SFRA connection.

    For more details on the switches, please see Table 4 of the user's guide. https://www.ti.com/lit/ug/spruii7b/spruii7b.pdf

    Han

  • Han,

    Thanks for your advice and guidance. I can connect now! Next, I will refer to this example and migration it to 28377.

    Tingting