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.

TMS320F28035: C2000 Serial Port Problem Out of Debug Mode

Part Number: TMS320F28035


Hi,

I'm using F28035 ISO Controlcard for application that reads data from sensor and sending me back from serial port. I have to set some values via serial port with sending characters. 

I'm programming card from flash. Problem is that when i programmed card and just run it (debug mode without any breakpoints ) it is working like its expected meaning that serial port is receiving and sending data back without any issue. But when i cut the power of controlcard and re-powering it i'm still able to get data from serial port ( i can see from ZoC terminal) but when i send a byte it is not receiving it at all. I dont know what is the problem in here. I'm attaching my serial code init and isr functions. 

My considerations : 

Is there any settings i'm missing about running from flash. Because program is running in debug mode but after unpower and power it , it is not receiving any bytes. Is this about any settings XDS100v2 debug port ?

Hope you can help me.

Here my sci init function : 

	  SciaRegs.SCICCR.all =0x0007;   // 1 stop bit,  No loopback
	                                 // No parity,8 char bits,
	                                 // async mode, idle-line protocol
	  SciaRegs.SCICTL1.all =0x0001;  // enable RX, internal SCICLK,
	                                 // Disable RX ERR, SLEEP, TXWAKE
	  SciaRegs.SCICTL2.bit.TXINTENA = 1;
	  SciaRegs.SCICTL2.bit.RXBKINTENA = 1;
	  SciaRegs.SCIHBAUD = 0x0000; // BAUDRATE Set to
	  SciaRegs.SCILBAUD = 0x000F; // 115200
	  SciaRegs.SCICCR.bit.LOOPBKENA = 0; // Disable Loopback
	  SciaRegs.SCIFFRX.all = 0x0021;
	  SciaRegs.SCIFFCT.all = 0x00;

	  SciaRegs.SCICTL1.all =0x0023;     // Relinquish SCI from Reset
//	  SciaRegs.SCIFFTX.bit.TXFIFOXRESET=1;
	  SciaRegs.SCIFFRX.bit.RXFIFORESET=1;
	  SciaRegs.SCIFFTX.bit.SCIFFENA = 1;
	  SciaRegs.SCIFFRX.bit.RXFFIENA = 1;

	  SciaRegs.SCIFFTX.all = 0xE040;

}

Here is my sci rx isr function : 

__interrupt void sciaRxFifoIsr(void)
{

    while(SciaRegs.SCIFFRX.bit.RXFFST != 0)
    {
        sciRXData = SciaRegs.SCIRXBUF.all;

        SciaRegs.SCITXBUF = sciRXData;

        if(sciRXData == 'C')
        {
        	reCalibrate = 1;
        }
        else if(sciRXData == 'R')
        {
        	reCalibrate = 0;
        }
        else
        {
        	ser_rec = 1;
        	reCalibrate = 10;
        }
    }

    SciaRegs.SCIFFRX.bit.RXFFOVRCLR=1;   // Clear Overflow flag
    SciaRegs.SCIFFRX.bit.RXFFINTCLR=1;   // Clear Interrupt flag

    PieCtrlRegs.PIEACK.all|=0x100;       // Issue PIE ack
}

  • Hi Rasih,

    I am not sure what would be causing the difference.

    Is the SCI RX interrupt linked to flash? Do you have code or data that are linked to run from RAM which may not be properly memory copied to RAM?

    To debug this further, you should be able to modify the GEL file of your target configuration such that when you connect the device does not reset. Then you can connect the debugger and debug this.

    Hope this helps.

    Regards,
    sal