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.

CCS/TMS320F28377S: C2000

Part Number: TMS320F28377S


Tool/software: Code Composer Studio

Hi all,

I am using TMS320F28377S for my project, in this i need to use UART communication for both transmission and reception.

I tried C2000 example codes, Transmission is working properly, reception interrupt not working. While check with oscilloscope the data received at reception pin(43) but interrupt not generate.

Help me to solve this issue.

Regards,

Yuvaraj

My code is

#include "driverlib.h"
#include "device.h"

#include "Macro.h"
#include "Xvar.h"
#include "com.h"


__interrupt void sciaTXFIFOISR(void);
__interrupt void sciaRXFIFOISR(void);
void initSCIAFIFO(void);
void error(void);

void data_to_port(unsigned char);
void sci_init();

unsigned char s_bytes;


void sci_init()
{
GPIO_setMasterCore(90, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_90_GPIO90);
GPIO_setDirectionMode(90, GPIO_DIR_MODE_OUT);
GPIO_setPadConfig(90, GPIO_PIN_TYPE_STD);

GPIO_setMasterCore(43, GPIO_CORE_CPU1);
GPIO_setDirectionMode(43, GPIO_DIR_MODE_IN);
GPIO_setPinConfig(GPIO_43_SCIRXDA);
GPIO_setPadConfig(43, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(43, GPIO_QUAL_ASYNC);

GPIO_setMasterCore(42, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_42_SCITXDA);
GPIO_setDirectionMode(42, GPIO_DIR_MODE_OUT);
GPIO_setPadConfig(42, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(42, GPIO_QUAL_ASYNC);

// Interrupts that are used in this example are re-mapped to
// ISR functions found within this file.
Interrupt_register(INT_SCIA_RX, sciaRXFIFOISR);
Interrupt_register(INT_SCIA_TX, sciaTXFIFOISR);

// Initialize the Device Peripherals:
initSCIAFIFO();

rDataPointA = sDataA[0];

Interrupt_enable(INT_SCIA_RX);
Interrupt_enable(INT_SCIA_TX);

// Interrupt_disable(INT_SCIA_RX);
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
}

// sciaTXFIFOISR - SCIA Transmit FIFO ISR
__interrupt void sciaTXFIFOISR(void)
{
SCI_writeCharArray(SCIA_BASE, sDataA, s_bytes);
SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_TXFF);

// Issue PIE ACK
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);

for(aa = 0; aa < 10000; aa++)
{
for(jj = 0; jj < 120; jj++)
{

}
}

Interrupt_disable(INT_SCIA_TX);
Interrupt_enable(INT_SCIA_RX);
GPIO_writePin(41, 0);
}

// sciaRXFIFOISR - SCIA Receive FIFO ISR
__interrupt void sciaRXFIFOISR(void)
{

SCI_readCharArray(SCIA_BASE, rDataA, 2);
SCI_clearOverflowStatus(SCIA_BASE);
SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_RXFF);

// Issue PIE ack
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
}

// initSCIAFIFO - Configure SCIA FIFO
void initSCIAFIFO()
{
// 8 char bits, 1 stop bit, no parity. Baud rate is 9600.
SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, 19200, (SCI_CONFIG_WLEN_8 | SCI_CONFIG_STOP_ONE |
SCI_CONFIG_PAR_NONE));
SCI_enableModule(SCIA_BASE);
// SCI_enableLoopback(SCIA_BASE);
SCI_resetChannels(SCIA_BASE);
SCI_enableFIFO(SCIA_BASE);

// RX and TX FIFO Interrupts Enabled
SCI_enableInterrupt(SCIA_BASE, (SCI_INT_TXFF));
SCI_disableInterrupt(SCIA_BASE, SCI_INT_RXERR);

SCI_setFIFOInterruptLevel(SCIA_BASE, SCI_FIFO_TX2, SCI_FIFO_RX2);
SCI_performSoftwareReset(SCIA_BASE);

SCI_resetTxFIFO(SCIA_BASE);
// SCI_resetRxFIFO(SCIA_BASE);
}