Skip to content

Commit

Permalink
Fixed syslink priority issue causing corrupt syslink packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbeanton committed Sep 2, 2015
1 parent 180cb75 commit c3f66f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/FreeRTOSConfig.h
Expand Up @@ -87,7 +87,7 @@
#define configUSE_MALLOC_FAILED_HOOK 1
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE

#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )

/* Set the following definitions to 1 to include the API function, or zero
Expand Down
2 changes: 1 addition & 1 deletion config/config.h
Expand Up @@ -74,7 +74,7 @@
#define MEM_TASK_PRI 1
#define PARAM_TASK_PRI 1
#define STABILIZER_TASK_PRI 4
#define SYSLINK_TASK_PRI 3
#define SYSLINK_TASK_PRI 5
#define USBLINK_TASK_PRI 3
#define PROXIMITY_TASK_PRI 0
//CF1
Expand Down
8 changes: 7 additions & 1 deletion drivers/src/uart_syslink.c
Expand Up @@ -322,13 +322,19 @@ void uartIsr(void)
xHigherPriorityTaskWoken = pdFALSE;
xSemaphoreGiveFromISR(waitUntilSendDone, &xHigherPriorityTaskWoken);
}
USART_ClearITPendingBit(UART_TYPE, USART_IT_TXE);
}
USART_ClearITPendingBit(UART_TYPE, USART_IT_TXE);
if (USART_GetITStatus(UART_TYPE, USART_IT_RXNE))
{
// Note: UART interrupt pending bit cleared by reading DR
rxDataInterrupt = USART_ReceiveData(UART_TYPE) & 0x00FF;
xQueueSendFromISR(uartDataDelivery, &rxDataInterrupt, &xHigherPriorityTaskWoken);
}

if (xHigherPriorityTaskWoken)
{
vPortYieldFromISR();
}
}

void uartTxenFlowctrlIsr()
Expand Down

0 comments on commit c3f66f0

Please sign in to comment.