Tool/software: TI-RTOS
My question is about RTOS Analyzer -> Execution Graph. I have four tasks, two of them were hooked to functions, ConvertTemp(), LogTempDegC(), by using the app.cfg tool statically, the other two tasks, LoTaskFxn(), HiTaskFxn(), were created dynamically to experiment GateMutexPri usage, please refer to the attachment file for the two dynamically created tasks. The Expression window showed all the four tasks running normally. However, the HiTaskFxn task was not shown in the Execution Graph. Please advise how to make it visible in the Execution Graph.
/**************************************************************************************** * Copyright: GoldenMaple Technologies (C) 2019 * Project: EECS X497.34 Course Project * File Name: F2806x_Temp.c * Description: F2806x Device Concurrent Tasks Demo * Language: TI TMS320F2806x C * Author: Louis Zhu * Created: 9/15/2019 * Notes: * Mod History: V1.0: Initial version developed on LaunchXL-F28069M LaunchPad ****************************************************************************************/ /* BIOS module Headers */ #include <xdc/std.h> #include <ti/sysbios/BIOS.h> #include <xdc/runtime/Error.h> #include <xdc/runtime/Log.h> #include <ti/sysbios/knl/Clock.h> #include <ti/sysbios/knl/Task.h> #include <ti/sysbios/gates/GateMutexPri.h> #include <ti/sysbios/gates/GateTask.h> #include "ConcurrentTasks.h" /**************************************************** * #pragma section ****************************************************/ /**************************************************** * Variable Declaration ****************************************************/ Int resource = 0; Int loTaskCount = 0; Int hiTaskCount = 0; UInt32 sleepTickCount; GateMutexPri_Handle gateHandle; Task_Handle loTaskHandle, hiTaskHandle; /**************************************************** * Static Function Prototypes ****************************************************/ void LoTaskFxn(void); void HiTaskFxn(void); /******************************************************************************************* * Function: InitConcurrentTasks * * Description: This function initializes Concurrent tasks data. * * Parameters: None * * Returns: None * * Special Notes: * *******************************************************************************************/ void InitConcurrentTasks(void) { /* Create BIOS objects */ Task_Params loTaskParams, hiTaskParams; Error_Block eb; GateMutexPri_Params gateParams; //create GateMutexPri object Error_init(&eb); GateMutexPri_Params_init(&gateParams); gateHandle = GateMutexPri_create(&gateParams, &eb); if (gateHandle == NULL) { Log_info0("Creating GateMutexPri failed."); } /* Construct writer/reader Task threads */ Task_Params_init(&loTaskParams); loTaskParams.priority = 1; loTaskHandle = Task_create((Task_FuncPtr)LoTaskFxn, &loTaskParams, NULL); if (loTaskHandle == NULL) { Log_info0("Creating LoTaskFxn failed."); } Task_Params_init(&hiTaskParams); hiTaskParams.priority = 3; hiTaskHandle = Task_create((Task_FuncPtr)HiTaskFxn, &hiTaskParams, NULL); if (hiTaskHandle == NULL) { Log_info0("Creating HiTaskFxn failed."); } /* sleep for defined time */ sleepTickCount = SLEEP_TIME / Clock_tickPeriod; } /******************************************************************************************* * Function: LoTaskFxn * * Description: This function * * Parameters: None * * Returns: None * * Special Notes: * *******************************************************************************************/ void LoTaskFxn(void) { UInt32 time; IArg key; while (1) { Log_info0("Running LoTaskFxn function."); key = GateMutexPri_enter(gateHandle); // Do work by waiting for 2 system ticks to pass time = Clock_getTicks(); while (Clock_getTicks() <= (time + sleepTickCount)) { ; } // Do work on locked resource resource += 1; loTaskCount += 1; //track the count from LoTaskFxn // Unlock resource GateMutexPri_leave(gateHandle, key); Task_sleep(sleepTickCount); } } /******************************************************************************************* * Function: HiTaskFxn * * Description: This function * * Parameters: None * * Returns: None * * Special Notes: * *******************************************************************************************/ void HiTaskFxn(void) { IArg key; while (1) { Log_info0("Running HiTaskFxn function."); // Get access to resource key = GateMutexPri_enter(gateHandle); // Do work on locked resource resource += 1; hiTaskCount += 1; //track the count from HiTaskFxn // Unlock resource GateMutexPri_leave(gateHandle, key); Task_sleep(sleepTickCount); } }