Hi
I try to add SCE UART usage in SimpleBLEPeripheral code of CC2560, since there is no main_tirtos.c from SCS, so I refer to Analog light sensor code write below code in scif_task.c. But UART interupt can only be triggered at the first time. How can I modify to make it useful everytime? Thank you very much
void taskFxn(UArg a0, UArg a1) {
// Initialize the Sensor Controller
scifOsalInit();
scifOsalRegisterCtrlReadyCallback(scCtrlReadyCallback);
scifOsalRegisterTaskAlertCallback(scTaskAlertCallback);
scifInit(&scifDriverSetup);
// Enable power domains
PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH) != PRCM_DOMAIN_POWER_ON);
// Enable peripheral clocks
PRCMPeripheralRunEnable(PRCM_PERIPH_GPIO);
PRCMLoadSet();
while (!PRCMLoadGet());
// Initialize and start the Sensor Controller
scifInit(&scifDriverSetup);
// Start the UART emulator
scifExecuteTasksOnceNbl(BV(SCIF_UART_EMULATOR_TASK_ID));
// Enable baud rate generation
scifUartSetBaudRate(57600);
// Enable RX
scifUartSetRxTimeout(20);
scifUartSetRxEnableReqIdleCount(1);
scifUartRxEnable(1);
// Enable events
//scifUartSetEventMask(0xF);
scifUartSetEventMask(BV_SCIF_UART_ALERT_RX_BYTE_TIMEOUT);
// Main loop
while (1) {
// Wait for an ALERT callback
Semaphore_pend(Semaphore_handle(&semScTaskAlert), BIOS_WAIT_FOREVER);
// Clear the ALERT interrupt source
scifClearAlertIntSource();
while (scifUartGetRxFifoCount()) {
scifUartTxPutChar((char) scifUartRxGetChar());
}
}
} // taskFxn