Part Number: TMS320F28388D
Other Parts Discussed in Thread: SYSBIOS
Hello,
I've a program that start with a "configuration" mode, where SysBios is not initialized and functional application is still not started, in this configuration I use SCI in FIFO mode to perform some debug/configuration.
My code of SCI FIFO initialize and deinitialize in this way:
void idSCIinitFIFO(void)
{
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
Interrupt_initModule();
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
Interrupt_initVectorTable();
Interrupt_register(INT_SCIA_RX, sciaRXFIFOISR);
Interrupt_register(INT_SCIA_TX, sciaTXFIFOISR);
SCI_resetChannels(SCIA_BASE);
SCI_enableFIFO(SCIA_BASE);
SCI_enableInterrupt(SCIA_BASE, (SCI_INT_RXFF | SCI_INT_TXFF));
SCI_disableInterrupt(SCIA_BASE, SCI_INT_RXERR);
SCI_setFIFOInterruptLevel(SCIA_BASE, SCI_FIFO_TX0, SCI_FIFO_RX1);
SCI_performSoftwareReset(SCIA_BASE);
SCI_resetTxFIFO(SCIA_BASE);
SCI_resetRxFIFO(SCIA_BASE);
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
EINT;
ERTM;
}
void idSCIdisableFIFO(void)
{
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
// To disable if generates problems, actually deactivated in case is activated during initialization
DINT;
DRTM;
SCI_disableInterrupt(SCIA_BASE, (SCI_INT_RXFF | SCI_INT_TXFF | SCI_INT_TXRDY | SCI_INT_RXRDY_BRKDT | SCI_INT_RXERR));
SCI_resetTxFIFO(SCIA_BASE);
SCI_resetRxFIFO(SCIA_BASE);
SCI_disableFIFO(SCIA_BASE);
Interrupt_disable(INT_SCIA_RX);
Interrupt_disable(INT_SCIA_TX);
Interrupt_unregister(INT_SCIA_RX);
Interrupt_unregister(INT_SCIA_TX);
SCI_performSoftwareReset(SCIA_BASE);
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
EINT;
ERTM;
}
Seems that there's leftovers since when I SysBios_Start() I've an interrupt unhandled that rises.
There's something that I miss to clear before start SysBios? I'd really like to avoid to add this interrupt to SysBios since it's really outside application.