Fixed some tasks regarding priority and stack
Updated makefile structure to support multi build git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@362 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -71,7 +71,15 @@ void OS_logTaskInfo(xTaskHandle taskHandle)
|
||||
LOGGER_INFO(mainLog, text);
|
||||
|
||||
highWaterMark = uxTaskGetStackHighWaterMark(taskHandle);
|
||||
snprintf(text, sizeof(text), "***** Stack high water mark : %lu long words", highWaterMark);
|
||||
snprintf(text, sizeof(text), " Stack high water mark : %lu long words", highWaterMark);
|
||||
LOGGER_INFO(mainLog, text);
|
||||
|
||||
TaskStatus_t taskStatus;
|
||||
vTaskGetInfo(taskHandle, &taskStatus, pdFALSE, eRunning);
|
||||
snprintf(text, sizeof(text), " Number: %d \t Priority: %d \t BasePriority: %d \t runtime: %d\n", (int)taskStatus.xTaskNumber,
|
||||
(int)taskStatus.uxCurrentPriority,
|
||||
(int)taskStatus.uxBasePriority,
|
||||
(int)taskStatus.ulRunTimeCounter);
|
||||
LOGGER_INFO(mainLog, text);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@ struct WarningQueueItem
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
static struct Observable observable;
|
||||
static TaskHandle_t warningTaskHandle;
|
||||
///TODO TEMPORARY
|
||||
TaskHandle_t warningTaskHandle;
|
||||
static QueueHandle_t warningQueue;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -70,7 +71,7 @@ ErrorStatus Warning_construct(void)
|
||||
Observable_construct(&observable);
|
||||
|
||||
warningQueue = xQueueCreate(WARNING_QUEUE_SIZE, sizeof(struct WarningQueueItem));
|
||||
xTaskCreate(WarningTask, "ErrorTask", 300, NULL, 1, &warningTaskHandle);
|
||||
xTaskCreate(WarningTask, "WarningTask", 300, NULL, 1, &warningTaskHandle);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -118,29 +118,29 @@ ErrorStatus hsb_enableSafetyWithError(void)
|
||||
CoverSolenoid_lock();
|
||||
}
|
||||
|
||||
// if (returnValue == SUCCESS)
|
||||
// {
|
||||
// // Check for INTERLOCK CLOSE
|
||||
// if (Interlock_isClosed(interlock))
|
||||
// {
|
||||
// // Enable Interrupt for interlock switch
|
||||
// Interlock_setEXTI(interlock, ENABLE);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Error_postError(INTERLOCK_COMMON_FAIL);
|
||||
// returnValue = ERROR;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (returnValue == SUCCESS)
|
||||
// {
|
||||
// // In case of a TESLA repair, release the teslaGunSafety
|
||||
// if (PCBA_getInstance()->pcba == PCBA_Tesla)
|
||||
// {
|
||||
// TeslaGunSafety_release();
|
||||
// }
|
||||
// }
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// Check for INTERLOCK CLOSE
|
||||
if (Interlock_isClosed(interlock))
|
||||
{
|
||||
// Enable Interrupt for interlock switch
|
||||
Interlock_setEXTI(interlock, ENABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
Error_postError(INTERLOCK_COMMON_FAIL);
|
||||
returnValue = ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// In case of a TESLA repair, release the teslaGunSafety
|
||||
if (PCBA_getInstance()->pcba == PCBA_Tesla)
|
||||
{
|
||||
TeslaGunSafety_release();
|
||||
}
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
@@ -164,29 +164,29 @@ ErrorStatus hsb_enableSafetyWithWarning(void)
|
||||
CoverSolenoid_lock();
|
||||
}
|
||||
|
||||
// if (returnValue == SUCCESS)
|
||||
// {
|
||||
// // Check for INTERLOCK CLOSE
|
||||
// if (Interlock_isClosed(interlock))
|
||||
// {
|
||||
// // Enable Interrupt for interlock switch
|
||||
// Interlock_setEXTI(interlock, ENABLE);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Warning_postWarning(WARNING_INTERLOCK_COMMON_FAIL);
|
||||
// returnValue = ERROR;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (returnValue == SUCCESS)
|
||||
// {
|
||||
// // In case of a TESLA repair, release the teslaGunSafety
|
||||
// if (PCBA_getInstance()->pcba == PCBA_Tesla)
|
||||
// {
|
||||
// TeslaGunSafety_release();
|
||||
// }
|
||||
// }
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// Check for INTERLOCK CLOSE
|
||||
if (Interlock_isClosed(interlock))
|
||||
{
|
||||
// Enable Interrupt for interlock switch
|
||||
Interlock_setEXTI(interlock, ENABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
Warning_postWarning(WARNING_INTERLOCK_COMMON_FAIL);
|
||||
returnValue = ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// In case of a TESLA repair, release the teslaGunSafety
|
||||
if (PCBA_getInstance()->pcba == PCBA_Tesla)
|
||||
{
|
||||
TeslaGunSafety_release();
|
||||
}
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
|
||||
@@ -104,6 +104,7 @@ struct HwValidationMenu* hwValidation = &_hwValidation;
|
||||
static struct CachedStorage cs = {.initialized = false};
|
||||
static struct CachedStorage deviceParameters = {.initialized = false};
|
||||
|
||||
//static char taskList[600];
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -166,22 +167,44 @@ static ErrorStatus systeminfoCommandHandler(void)
|
||||
snprintf(text, sizeof(text), "Free heap memory: %d bytes", (int)freeMemory);
|
||||
LOGGER_INFO(mainLog, text);
|
||||
|
||||
vTaskDelay(10);
|
||||
UBaseType_t numberOfTasks;
|
||||
numberOfTasks = uxTaskGetNumberOfTasks();
|
||||
snprintf(text, sizeof(text), "Number of managed tasks: %d", (int)numberOfTasks);
|
||||
LOGGER_INFO(mainLog, text);
|
||||
|
||||
// vTaskList(taskList);
|
||||
// IODevice_write((struct IODevice*)uart1, taskList, 600);
|
||||
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(initTaskHandle);
|
||||
vTaskDelay(10);
|
||||
OS_logTaskInfo(ledTaskHandle);
|
||||
vTaskDelay(10);
|
||||
OS_logTaskInfo(sysTaskHandle);
|
||||
vTaskDelay(10);
|
||||
OS_logTaskInfo(mainMenu->menuCore->taskHandle);
|
||||
vTaskDelay(10);
|
||||
OS_logTaskInfo(rp->taskHandle);
|
||||
vTaskDelay(10);
|
||||
OS_logTaskInfo(mainDisplay->taskHandle);
|
||||
vTaskDelay(10);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(errorTaskHandle);
|
||||
vTaskDelay(10);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(warningTaskHandle);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(interlock->taskHandle);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(mainLog->taskHandle);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(keypad->taskHandle);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(mainBuzzer->taskHandle);
|
||||
vTaskDelay(100);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(mainDisplay->taskHandle);
|
||||
#ifdef ENABLE_HW_VALIDATION
|
||||
OS_logTaskInfo(hwValidation->taskHandle);
|
||||
#endif
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(sysTaskHandle);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(ledTaskHandle);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(mainMenu->menuCore->taskHandle);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(rp->taskHandle);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -277,15 +300,15 @@ static void initTask(void* parameters)
|
||||
hwTestItems.pcba = PCBA_getInstance();
|
||||
hwTestItems.keypad = keypad;
|
||||
// EEPROM TO BE DONE
|
||||
HwValidationMenu_construct(hwValidation, &uart3->device, &hwTestItems, 1, 1024);
|
||||
HwValidationMenu_construct(hwValidation, &uart3->device, &hwTestItems, 3, 1024);
|
||||
}
|
||||
#endif
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// Create task that repeats to print out TASK information on the logger
|
||||
xTaskCreate(printSystemInfoTask, (const char* const)"SysInfoTask", 512, NULL, 0, &sysTaskHandle);
|
||||
xTaskCreate(printSystemInfoTask, (const char* const)"SysInfoTask", 512, NULL, 4, &sysTaskHandle);
|
||||
// Create a small task that only blinks a LED and flashes the identification letter on the display
|
||||
xTaskCreate(ledBlinkTask, (const char* const)"ledTask", 100, &ledTaskArguments, 0, &ledTaskHandle);
|
||||
xTaskCreate(ledBlinkTask, (const char* const)"ledTask", 100, &ledTaskArguments, 4, &ledTaskHandle);
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "MenuText.h"
|
||||
|
||||
#include "CoverSolenoid.h"
|
||||
#include "Leds.h"
|
||||
#include "Logger.h"
|
||||
#include "Interlock.h"
|
||||
#include "internalADC.h"
|
||||
|
||||
Reference in New Issue
Block a user