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.

while the UART interrupt, if called the osi_MsgQWrite function, it called loader_exit.

Other Parts Discussed in Thread: SYSBIOS

Hello,


I have made the UART interrupt handler, but it was not working because it is loader_exit.

MY code is as bellows.

in main function.

 MAP_UARTFlowControlSet(UARTA0_BASE, UART_FLOWCONTROL_NONE);
 MAP_UARTFIFODisable(UARTA0_BASE);
 MAP_UARTIntRegister(UARTA0_BASE, UartIntHandler);
 MAP_UARTIntEnable(UARTA0_BASE, UART_INT_RX|UART_INT_RT);
 ClearTerm();


;;;;

unsigned int uartRxLength = 0;
void UartIntHandler(void)
{
 unsigned long intStatus = MAP_UARTIntStatus(UARTA0_BASE, true);
 if((intStatus & UART_INT_RX) && MAP_UARTCharsAvail(UARTA0_BASE))
 {
  uartRxLength++;
  g_lightSTA.acCmdStore[uartRxLength] = (unsigned char)MAP_UARTCharGetNonBlocking(UARTA0_BASE);
 
  if (g_lightSTA.started == true)
  {
   osi_MsgQWrite(&g_lightSTA.MsgQ, (void*)STA_UART_INPUT, OSI_NO_WAIT);
  
  }
  MAP_UARTCharPut(UARTA0_BASE,g_lightSTA.acCmdStore[uartRxLength]);
 }
 else if(intStatus & UART_INT_RT)
 {
  g_lightSTA.acCmdStore[0] = uartRxLength;
  uartRxLength = 0;
 }
 MAP_UARTIntClear(UARTA0_BASE, intStatus);
}

one task waiting for the msg..

while (1)
 {
  UART_PRINT("Waiting messages\n\r");
  osi_MsgQRead(&m->MsgQ, pcMessage, OSI_WAIT_FOREVER);


the error msg is as bellow when it is loader_exit.
ti.sysbios.knl.Task: line 383: E_spOutOfBounds: Task 0x2002ef00 stack error, SP = 0x2002c748.
xdc.runtime.Error.raise: terminating execution

Best Regards,


SungHun.