5353/* DASHTaskRx / DASHTaskTx stacks: set in CubeMX (DASH.ioc, FREERTOS.Tasks01). Regenerating
5454 * from the .ioc overwrites osThreadAttr_t blocks above; keep those tasks at 1024 words. */
5555/* USER CODE END Variables */
56- /* Definitions for btnTxLoopTask */
57- osThreadId_t btnTxLoopTaskHandle ;
58- const osThreadAttr_t btnTxLoopTask_attributes = {
59- .name = "btnTxLoopTask " ,
60- .stack_size = 1024 * 4 ,
56+ /* Definitions for ioLoopTask */
57+ osThreadId_t ioLoopTaskHandle ;
58+ const osThreadAttr_t ioLoopTask_attributes = {
59+ .name = "ioLoopTask " ,
60+ .stack_size = 512 * 4 ,
6161 .priority = (osPriority_t ) osPriorityHigh1 ,
6262};
6363/* Definitions for displayTask */
6464osThreadId_t displayTaskHandle ;
6565const osThreadAttr_t displayTask_attributes = {
6666 .name = "displayTask" ,
6767 .stack_size = 1024 * 4 ,
68- .priority = (osPriority_t ) osPriorityHigh ,
68+ .priority = (osPriority_t ) osPriorityAboveNormal ,
6969};
7070/* Definitions for uartRxTask */
7171osThreadId_t uartRxTaskHandle ;
@@ -86,14 +86,14 @@ osThreadId_t DASHTaskRxHandle;
8686const osThreadAttr_t DASHTaskRx_attributes = {
8787 .name = "DASHTaskRx" ,
8888 .stack_size = 1024 * 4 ,
89- .priority = (osPriority_t ) osPriorityLow ,
89+ .priority = (osPriority_t ) osPriorityHigh2 ,
9090};
9191/* Definitions for DASHTaskTx */
9292osThreadId_t DASHTaskTxHandle ;
9393const osThreadAttr_t DASHTaskTx_attributes = {
9494 .name = "DASHTaskTx" ,
9595 .stack_size = 1024 * 4 ,
96- .priority = (osPriority_t ) osPriorityLow ,
96+ .priority = (osPriority_t ) osPriorityHigh3 ,
9797};
9898/* Definitions for canTxQueue */
9999osMessageQueueId_t canTxQueueHandle ;
@@ -151,7 +151,7 @@ const osSemaphoreAttr_t uartTxSem_attributes = {
151151
152152/* USER CODE END FunctionPrototypes */
153153
154- void StartBtnTxLoop (void * argument );
154+ void StartIoLoop (void * argument );
155155void StartDisplayTask (void * argument );
156156void StartUartRxTask (void * argument );
157157void StartUartTxTask (void * argument );
@@ -285,8 +285,8 @@ void MX_FREERTOS_Init(void) {
285285 /* USER CODE END RTOS_QUEUES */
286286
287287 /* Create the thread(s) */
288- /* creation of btnTxLoopTask */
289- btnTxLoopTaskHandle = osThreadNew (StartBtnTxLoop , NULL , & btnTxLoopTask_attributes );
288+ /* creation of ioLoopTask */
289+ ioLoopTaskHandle = osThreadNew (StartIoLoop , NULL , & ioLoopTask_attributes );
290290
291291 /* creation of displayTask */
292292 displayTaskHandle = osThreadNew (StartDisplayTask , NULL , & displayTask_attributes );
@@ -305,7 +305,7 @@ void MX_FREERTOS_Init(void) {
305305
306306 /* USER CODE BEGIN RTOS_THREADS */
307307 /* Validate all thread creations - fail fast on low heap */
308- REQUIRE_RTOS_HANDLE (btnTxLoopTaskHandle );
308+ REQUIRE_RTOS_HANDLE (ioLoopTaskHandle );
309309 REQUIRE_RTOS_HANDLE (displayTaskHandle );
310310 REQUIRE_RTOS_HANDLE (uartRxTaskHandle );
311311 REQUIRE_RTOS_HANDLE (uartTxTaskHandle );
@@ -320,22 +320,22 @@ void MX_FREERTOS_Init(void) {
320320
321321}
322322
323- /* USER CODE BEGIN Header_StartBtnTxLoop */
323+ /* USER CODE BEGIN Header_StartIoLoop */
324324/**
325- * @brief Function implementing the btnTxLoopTask thread.
325+ * @brief Function implementing the ioLoopTask thread.
326326 * @param argument: Not used
327327 * @retval None
328328 */
329- /* USER CODE END Header_StartBtnTxLoop */
330- __weak void StartBtnTxLoop (void * argument )
329+ /* USER CODE END Header_StartIoLoop */
330+ __weak void StartIoLoop (void * argument )
331331{
332- /* USER CODE BEGIN StartBtnTxLoop */
332+ /* USER CODE BEGIN StartIoLoop */
333333 /* Infinite loop */
334334 for (;;)
335335 {
336336 osDelay (1 );
337337 }
338- /* USER CODE END StartBtnTxLoop */
338+ /* USER CODE END StartIoLoop */
339339}
340340
341341/* USER CODE BEGIN Header_StartDisplayTask */
0 commit comments