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.

F28335 SCI A FIFO Interrupt Not Firing

The SCI port A FIFO interrupt I cannot get to fire with the following setup, this is also the same setup used with port B that is working.

 

Interrupt Service Routines:

 

 

 

 

 

 

 

 

interrupt

 

void SciRx_ISR( void )

{

Uint16 Index = 0;

 

 

 

//Empty the Data Buffer

 

 

for

( Index = 0; Index < 16; Index++ )

{

SciRxDataBuffer[ Index ] = SciaRegs.SCIRXBUF.bit.RXDT;

}

 

//Read the data buffer

 

SciaRegs.SCIFFRX.bit.RXFFOVRCLR = 1;

SciaRegs.SCIFFRX.bit.RXFFINTCLR = 1;

PieCtrlRegs.PIEACK.all = PIEACK_GROUP9;

 

//Acknowledge Interrupt

}

 

//Sci Rx Interrupt Service Routine

 

interrupt

 

void SciTx_ISR( void  )

{

Uint16 Index = 0;

 

 

 

//STUFF THE FIFO

 

 

for

( Index = 0; Index < 16; Index++ )

{

ScibRegs.SCITXBUF = 0xFF;

}

 

//Stuff the FIFO

 

SciaRegs.SCIFFTX.bit.TXFFINTCLR = 1;

PieCtrlRegs.PIEACK.all = PIEACK_GROUP9;

 

//Acknowledge Interrupt

}

 

//Sci Tx Interrupt Service Routine

Initialization

 

void

 

InitSci(void)

{

 

 

// Initialize SCI-A: Port used for flash programming

 

 

 

 

 

 

//This port is used by the bootloader and the GUI link

InitSciaGpio();

InitSciA();

 

}

 

 

 

 

 

 

 

 

 

 

void

 

 

InitSciaGpio()

{

EALLOW;

 

/* Enable internal pull-up for the selected pins */

// Pull-ups can be enabled or disabled disabled by the user.

// This will enable the pullups for the specified pins.

 

GpioCtrlRegs.GPAPUD.bit.GPIO28 = 0;

 

// Enable pull-up for GPIO28 (SCIRXDA)

GpioCtrlRegs.GPAPUD.bit.GPIO29 = 0;

 

// Enable pull-up for GPIO29 (SCITXDA)

 

/* Set qualification for selected pins to asynch only */

// Inputs are synchronized to SYSCLKOUT by default.

// This will select asynch (no qualification) for the selected pins.

 

GpioCtrlRegs.GPAQSEL2.bit.GPIO28 = 3;

 

// Asynch input GPIO28 (SCIRXDA)

 

/* Configure SCI-A pins using GPIO regs*/

// This specifies which of the possible GPIO pins will be SCI functional pins.

 

GpioCtrlRegs.GPAMUX2.bit.GPIO28 = 1;

 

// Configure GPIO28 for SCIRXDA operation

GpioCtrlRegs.GPAMUX2.bit.GPIO29 = 1;

 

// Configure GPIO29 for SCITXDA operation

 

EDIS;

}

 

void

 

 

InitSciA( void

)

{

 

 

//Control Register 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SciaRegs.SCICTL1.bit.SWRESET = 0;

 

//Put the port in reset

 

 

 

//Communication Control Register

SciaRegs.SCICCR.bit.STOPBITS = 0;

 

//One Stop Bit

SciaRegs.SCICCR.bit.PARITY = 0;

 

//Odd Parity

SciaRegs.SCICCR.bit.PARITYENA = 1;

 

//Parity Enabled

SciaRegs.SCICCR.bit.LOOPBKENA = 0;

 

//Loopback Disabled

SciaRegs.SCICCR.bit.ADDRIDLE_MODE = 0;

 

//Idle-Line Protocol Selected

SciaRegs.SCICCR.bit.SCICHAR = 7;

 

//8 Data Bits

 

 

 

//Control Register 1

SciaRegs.SCICTL1.bit.TXENA = 1;

 

//Transmitter Enabled

SciaRegs.SCICTL1.bit.RXENA = 1;

 

//Receiver Enabled

SciaRegs.SCICTL1.bit.RXERRINTENA = 1;

 

SciaRegs.SCIHBAUD = 0x01;

 

//Configure for 9600 Baud Rate

SciaRegs.SCILBAUD = 0xE7;

 

//Configure for 9600 Baud Rate

 

 

 

//FIFO Configuration Registers

 

 

//Tx

SciaRegs.SCIFFTX.bit.SCIRST = 1;

 

//FIFO Can Receive/Transmit

SciaRegs.SCIFFTX.bit.TXFIFOXRESET = 0;

 

//Hold In Reset

// SciaRegs.SCIFFTX.bit.SCIFFENA = 0; //FIFO Enhancements are disabled

SciaRegs.SCIFFTX.bit.SCIFFENA = 1;

 

//FIFO Enhancements are Enabled

SciaRegs.SCIFFTX.bit.TXFFIENA = 1;

 

//Transmit FIFO Interrupt Enabled

SciaRegs.SCIFFTX.bit.TXFFIL = 0;

 

//Fire Tx Interrupt when empty

 

 

 

//Rx

SciaRegs.SCIFFRX.bit.RXFIFORESET = 0;

 

//Hold In Reset

SciaRegs.SCIFFRX.bit.RXFFIENA = 1;

 

//Enable Rx Interrupt

SciaRegs.SCIFFRX.bit.RXFFIL = 1;

 

//Set FIFO Level to 16 bytes

 

 

 

//Control

SciaRegs.SCIFFCT.bit.CDC = 0;

 

//Disable Auto Baud Alignment

SciaRegs.SCIFFCT.bit.FFTXDLY = 0;

 

//0 Tx Delay

 

 

 

//Enable The Device and Take it out of Reset

SciaRegs.SCICTL1.bit.SWRESET = 1;

 

//Enable the SCI Port

SciaRegs.SCIFFRX.bit.RXFIFORESET = 1;

 

//Take Rx FIFO out of reset

SciaRegs.SCIFFTX.bit.TXFIFOXRESET = 1;

 

//Take Rx FIFO out of reset

 

}

 

//InitSciA

PIE Controls

 

 

PieCtrlRegs.PIEIER9.bit.INTx1 = 1;

 

PieCtrlRegs.PIEIER9.bit.INTx2 = 1;

 

PieVectTable.SCIRXINTA = &SciRx_ISR;

PieVectTable.SCITXINTA = &SciTx_ISR;

//GUI Sci Tx Interrupt

There is probably something small that I am missing, I have made sure that the SCIA clock is enabled but I seem to be missing something because I see that the SciaRegs,SCIFFTX.TXFFINT = 1 but but my code never enters the ISR, and I send data from my PC to the device and I can see it on a Oscilloscope but yet the Rx interrupt does not fire. 

//GUI Sci RX Interrupt

 

 

  • Hi Jacob,

       PieCtrlRegs.PIECTRL.bit.ENPIE = 1;   // Enable the PIE block
       IER |= M_INT9;
       EINT;          //Enable Global interrupt INTM

    pls ensure that you have done the above mentioned interrupt settings in your firmware.

    Warm Regards,

    Karthick




  • Hello Karthick,

    Thank you for responding.  I have actually cleared up this issue.  The problem was that with my serial cable plugged in and the serial port not connected it was casuing an Rx Error.  Once in my ISR I added a handler for this occurrance I no longer had issues.

    Thanks,

    Jake