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.
Tool/software: Code Composer Studio
My SCI interrupt only enter one time when i use SYSBIOS. I configured my HWI through *.cfg file.
The following is my code.
#include "driverlib.h"
#include "device.h"
//#include <xdc/std.h>
//#include <xdc/runtime/Log.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Semaphore.h>
#include <ti/sysbios/family/c28/Hwi.h>
#include "cpsFIFO.h"
//#include <xdc/runtime/Error.h>
//#include <xdc/runtime/System.h>
// Prototype statements for functions found within this file.
interrupt void sciaTxFifoIsr(void);
interrupt void sciaRxFifoIsr(void);
void scia_fifo_init(void);
static uint16_t tickCount = 0;
/*
* ======== main ========
*/
Int main()
{
/*
* Print "Hello world" to a log buffer.
*/
//Log_info0("Hello world\n");
// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
//SysCtl_disableWatchdog();
Device_enableAllPeripherals();
//
// Interrupts that are used in this example are re-mapped to
// ISR functions found within this file.
//
// GPIO43 is the SCI Rx pin.
//
GPIO_setMasterCore(43, GPIO_CORE_CPU1);
GPIO_setPinConfig(GPIO_43_SCIRXDA);
GPIO_setDirectionMode(43, GPIO_DIR_MODE_IN);
GPIO_setPadConfig(43, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(43, GPIO_QUAL_ASYNC);
//
// GPIO42 is the SCI Tx pin.
//
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);
scia_fifo_init();
//Interrupt_enable(INT_SCIA_RX);
//Interrupt_enable(INT_SCIA_TX);
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
/*
* Start BIOS.
* Begins task scheduling.
*/
BIOS_start(); /* does not return */
return(0);
}
void myTickFxn(void)
{
tickCount++;
}
void delay(Uint32 n)
{
while(n--)
__asm("nop");
}
void sciaTaskFnx()
{
int len = 4;
Uint16 data[4];
//hwSerialPortInit(SCIA_COM0);
while(1)
{
DEVICE_DELAY_US(1000*2);
}
}
interrupt void sciaTxFifoIsr(void)
{
//UARTTxISR(SCIA_COM0);
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
}
interrupt void sciaRxFifoIsr(void)
{
uint16_t rDataA = 0;
//UARTRxISR(SCIA_COM0);
if(SCI_isDataAvailableNonFIFO(SCIA_BASE))
{
SCI_readCharArray(SCIA_BASE, &rDataA, 1);
}
SCI_clearOverflowStatus(SCIA_BASE);
SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_RXRDY_BRKDT);
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
}
void scia_fifo_init()
{
//
// 8 char bits, 1 stop bit, no parity. Baud rate is 115200.
//
SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, 115200, (SCI_CONFIG_WLEN_8 |
SCI_CONFIG_STOP_ONE |
SCI_CONFIG_PAR_NONE));
SCI_enableModule(SCIA_BASE);
SCI_resetChannels(SCIA_BASE);
SCI_enableInterrupt(SCIA_BASE, (SCI_INT_RXRDY_BRKDT | SCI_INT_TXRDY));
SCI_disableInterrupt(SCIA_BASE, SCI_INT_RXERR);
SCI_performSoftwareReset(SCIA_BASE);
}
I set breakpoint at the sciaRxFifoIsr function, and noticed that ISR only entered once. then ISR can't enter anyway. Can anyone help me to figure out where the problem is?
Hi XX XX,
I was able to build your project and reproduce the problem. It looks like after the first sci interrupt occurs, the BIOS dispatcher returns to _c_int00. I'm not sure why that would happen. I also noticed that you had the "interrupt" keyword for your interrupts. You don't need that since you are using the BIOS Hwi dispatcher.
I will be out for 2 weeks over the holidays, so I won't be able to get back to this before Jan 6. Hopefully this will be resolved before then, but if not I will look at this again in January.
Best regards,
Janet