Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D
Dear TI Experts,
I'm working on Launchxl-F28379D board.
What I want is to get continuous data and sent ACK or NAK with SCIB.
I tested this in polling mode, Non FIFO interrupt and FIFO interrupt.
But in all cases, I failed to receive the whole data.
In case of using Non FIFO interrupt, I can receive all data only if my PC application sends data with over 200ms wait in between.
But data with no wait or 100ms wait can't be received on SCIB.
This symptom is the same in the different operation mode.
With FIFO interrupt mode, I set FIFO Level to two and I can receive two continuous bytes successfully, but next two bytes are broken in case of insufficient wait between first two bytes and the next two bytes.
Below is my code for Non FIFI Interrupt mode.
Please anybody advice me about what I did mistake.
In main function
Device_init();
Device_initGPIO();
//
// GPIO19 is the SCI Rx pin.
//
GPIO_setMasterCore(19, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_19_SCIRXDB);
GPIO_setDirectionMode(19, GPIO_DIR_MODE_IN);
GPIO_setPadConfig(19, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(19, GPIO_QUAL_ASYNC);
//
// GPIO18 is the SCI Tx pin.
//
GPIO_setMasterCore(18, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_18_SCITXDB);
GPIO_setDirectionMode(18, GPIO_DIR_MODE_OUT);
GPIO_setPadConfig(18, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(18, GPIO_QUAL_ASYNC);
Interrupt_initModule();
Interrupt_initVectorTable();
Interrupt_register(INT_SCIB_RX, scibRXFIFOISR);
setSCIB();
Interrupt_enable(INT_SCIB_RX);
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
EINT;
ERTM;
for(;;)
{
}
In setSCIB()
void setSCIB(void)
{
SCI_performSoftwareReset(SCIB_BASE);
//
// Configure SCIA for echoback.
//
SCI_setConfig(SCIB_BASE, DEVICE_LSPCLK_FREQ, 9600, (SCI_CONFIG_WLEN_8 |
SCI_CONFIG_STOP_TWO |
SCI_CONFIG_PAR_NONE));
SCI_resetChannels(SCIB_BASE);
SCI_clearInterruptStatus(SCIB_BASE, SCI_INT_RXRDY_BRKDT);
SCI_enableModule(SCIB_BASE);
SCI_performSoftwareReset(SCIB_BASE);
SCI_enableInterrupt(SCIB_BASE, (SCI_INT_RXRDY_BRKDT));
}
In scibRXFIFOISR()
__interrupt void scibRXFIFOISR(void)
{
uint16_t i;
uint16_t rcvChar[2];
uint16_t fifoLevel;
rcvdData = SCI_readCharBlockingNonFIFO(SCIB_BASE);
SCI_clearOverflowStatus(SCIB_BASE);
SCI_clearInterruptStatus(SCIB_BASE, SCI_INT_RXRDY_BRKDT);
//
// Issue PIE ack
//
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
}
Thank you in advance.
Best regards,
James.