Index: ctrl/firmware/Main/CubeMX/Core/Inc/app_threadx.h
===================================================================
--- ctrl/firmware/Main/CubeMX/Core/Inc/app_threadx.h	(revision 69)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/* USER CODE BEGIN Header */
-/**
-  ******************************************************************************
-  * @file    app_threadx.h
-  * @author  MCD Application Team
-  * @brief   ThreadX applicative header file
-  ******************************************************************************
-  * @attention
-  *
-  * Copyright (c) 2020-2021 STMicroelectronics.
-  * All rights reserved.
-  *
-  * This software is licensed under terms that can be found in the LICENSE file
-  * in the root directory of this software component.
-  * If no LICENSE file comes with this software, it is provided AS-IS.
-  *
-  ******************************************************************************
-  */
-/* USER CODE END Header */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __APP_THREADX_H__
-#define __APP_THREADX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-/* Includes ------------------------------------------------------------------*/
-#include "tx_api.h"
-
-/* Private includes ----------------------------------------------------------*/
-/* USER CODE BEGIN Includes */
-
-/* USER CODE END Includes */
-
-/* Exported types ------------------------------------------------------------*/
-/* USER CODE BEGIN ET */
-
-/* USER CODE END ET */
-
-/* Exported constants --------------------------------------------------------*/
-/* USER CODE BEGIN EC */
-
-/* USER CODE END EC */
-
-/* Private defines -----------------------------------------------------------*/
-/* USER CODE BEGIN PD */
-
-/* USER CODE END PD */
-
-/* Main thread defines -------------------------------------------------------*/
-/* USER CODE BEGIN MTD */
-
-/* USER CODE END MTD */
-
-/* Exported macro ------------------------------------------------------------*/
-
-/* USER CODE BEGIN EM */
-
-/* USER CODE END EM */
-
-/* Exported functions prototypes ---------------------------------------------*/
-UINT App_ThreadX_Init(VOID *memory_ptr);
-void MX_ThreadX_Init(void);
-/* USER CODE BEGIN EFP */
-
-/* USER CODE END EFP */
-
-/* USER CODE BEGIN 1 */
-
-/* USER CODE END 1 */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __APP_THREADX_H__ */
Index: ctrl/firmware/Main/CubeMX/Core/Inc/stm32h7xx_it.h
===================================================================
--- ctrl/firmware/Main/CubeMX/Core/Inc/stm32h7xx_it.h	(revision 69)
+++ ctrl/firmware/Main/CubeMX/Core/Inc/stm32h7xx_it.h	(revision 70)
@@ -52,5 +52,8 @@
 void BusFault_Handler(void);
 void UsageFault_Handler(void);
+void SVC_Handler(void);
 void DebugMon_Handler(void);
+void PendSV_Handler(void);
+void SysTick_Handler(void);
 void DMA1_Stream0_IRQHandler(void);
 void DMA1_Stream1_IRQHandler(void);
Index: ctrl/firmware/Main/CubeMX/Core/Inc/tx_user.h
===================================================================
--- ctrl/firmware/Main/CubeMX/Core/Inc/tx_user.h	(revision 69)
+++ 	(revision )
@@ -1,297 +1,0 @@
-/**************************************************************************/
-/*                                                                        */
-/*       Copyright (c) Microsoft Corporation. All rights reserved.        */
-/*                                                                        */
-/*       This software is licensed under the Microsoft Software License   */
-/*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
-/*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
-/*       and in the root directory of this software.                      */
-/*                                                                        */
-/**************************************************************************/
-
-/**************************************************************************/
-/**************************************************************************/
-/**                                                                       */
-/** ThreadX Component                                                     */
-/**                                                                       */
-/**   User Specific                                                       */
-/**                                                                       */
-/**************************************************************************/
-/**************************************************************************/
-
-/**************************************************************************/
-/*                                                                        */
-/*  PORT SPECIFIC C INFORMATION                            RELEASE        */
-/*                                                                        */
-/*    tx_user.h                                           PORTABLE C      */
-/*                                                           6.3.0        */
-/*                                                                        */
-/*  AUTHOR                                                                */
-/*                                                                        */
-/*    William E. Lamie, Microsoft Corporation                             */
-/*                                                                        */
-/*  DESCRIPTION                                                           */
-/*                                                                        */
-/*    This file contains user defines for configuring ThreadX in specific */
-/*    ways. This file will have an effect only if the application and     */
-/*    ThreadX library are built with TX_INCLUDE_USER_DEFINE_FILE defined. */
-/*    Note that all the defines in this file may also be made on the      */
-/*    command line when building ThreadX library and application objects. */
-/*                                                                        */
-/*  RELEASE HISTORY                                                       */
-/*                                                                        */
-/*    DATE              NAME                      DESCRIPTION             */
-/*                                                                        */
-/*  05-19-2020      William E. Lamie        Initial Version 6.0           */
-/*  09-30-2020      Yuxin Zhou              Modified comment(s),          */
-/*                                            resulting in version 6.1    */
-/*  03-02-2021      Scott Larson            Modified comment(s),          */
-/*                                            added option to remove      */
-/*                                            FileX pointer,              */
-/*                                            resulting in version 6.1.5  */
-/*  06-02-2021      Scott Larson            Added options for multiple    */
-/*                                            block pool search & delay,  */
-/*                                            resulting in version 6.1.7  */
-/*  10-15-2021      Yuxin Zhou              Modified comment(s), added    */
-/*                                            user-configurable symbol    */
-/*                                            TX_TIMER_TICKS_PER_SECOND   */
-/*                                            resulting in version 6.1.9  */
-/*  04-25-2022      Wenhui Xie              Modified comment(s),          */
-/*                                            optimized the definition of */
-/*                                            TX_TIMER_TICKS_PER_SECOND,  */
-/*                                            resulting in version 6.1.11 */
-/*  10-31-2023      Xiuwen Cai              Modified comment(s),          */
-/*                                            added option for random     */
-/*                                            number stack filling,       */
-/*                                            resulting in version 6.3.0  */
-/*                                                                        */
-/**************************************************************************/
-
-#ifndef TX_USER_H
-#define TX_USER_H
-
-/* USER CODE BEGIN 1 */
-
-/* USER CODE END 1 */
-
-/* Define various build options for the ThreadX port.  The application should either make changes
-   here by commenting or un-commenting the conditional compilation defined OR supply the defines
-   though the compiler's equivalent of the -D option.
-
-   For maximum speed, the following should be defined:
-
-        TX_MAX_PRIORITIES                       32
-        TX_DISABLE_PREEMPTION_THRESHOLD
-        TX_DISABLE_REDUNDANT_CLEARING
-        TX_DISABLE_NOTIFY_CALLBACKS
-        TX_NOT_INTERRUPTABLE
-        TX_TIMER_PROCESS_IN_ISR
-        TX_REACTIVATE_INLINE
-        TX_DISABLE_STACK_FILLING
-        TX_INLINE_THREAD_RESUME_SUSPEND
-        TX_DISABLE_ERROR_CHECKING
-
-   For minimum size, the following should be defined:
-
-        TX_MAX_PRIORITIES                       32
-        TX_DISABLE_PREEMPTION_THRESHOLD
-        TX_DISABLE_REDUNDANT_CLEARING
-        TX_DISABLE_NOTIFY_CALLBACKS
-        TX_NO_FILEX_POINTER
-        TX_NOT_INTERRUPTABLE
-        TX_TIMER_PROCESS_IN_ISR
-
-   Of course, many of these defines reduce functionality and/or change the behavior of the
-   system in ways that may not be worth the trade-off. For example, the TX_TIMER_PROCESS_IN_ISR
-   results in faster and smaller code, however, it increases the amount of processing in the ISR.
-   In addition, some services that are available in timers are not available from ISRs and will
-   therefore return an error if this option is used. This may or may not be desirable for a
-   given application.  */
-
-/* Override various options with default values already assigned in tx_port.h. Please also refer
-   to tx_port.h for descriptions on each of these options.  */
-
-/*#define TX_MAX_PRIORITIES                32*/
-/*#define TX_TIMER_THREAD_STACK_SIZE                1024*/
-/*#define TX_TIMER_THREAD_PRIORITY                0*/
-
-/*#define TX_MINIMUM_STACK                200*/
-
-/* Determine if timer expirations (application timers, timeouts, and tx_thread_sleep calls
-   should be processed within the a system timer thread or directly in the timer ISR.
-   By default, the timer thread is used. When the following is defined, the timer expiration
-   processing is done directly from the timer ISR, thereby eliminating the timer thread control
-   block, stack, and context switching to activate it.  */
-
-/*#define TX_TIMER_PROCESS_IN_ISR*/
-
-/* Determine if in-line timer reactivation should be used within the timer expiration processing.
-   By default, this is disabled and a function call is used. When the following is defined,
-   reactivating is performed in-line resulting in faster timer processing but slightly larger
-   code size.  */
-
-/*#define TX_REACTIVATE_INLINE*/
-
-/* Determine is stack filling is enabled. By default, ThreadX stack filling is enabled,
-   which places an 0xEF pattern in each byte of each thread's stack.  This is used by
-   debuggers with ThreadX-awareness and by the ThreadX run-time stack checking feature.  */
-
-/*#define TX_DISABLE_STACK_FILLING*/
-
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
-   disabled. When the following is defined, ThreadX thread stack checking is enabled.  If stack
-   checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
-   define is negated, thereby forcing the stack fill which is necessary for the stack checking
-   logic.  */
-
-#define TX_ENABLE_STACK_CHECKING
-
-/* Determine if random number is used for stack filling. By default, ThreadX uses a fixed pattern
-   for stack filling. When the following is defined, ThreadX uses a random number for stack filling.
-   This is effective only when TX_ENABLE_STACK_CHECKING is defined.  */
-
-/*#define TX_ENABLE_RANDOM_NUMBER_STACK_FILLING*/
-
-/* Determine if preemption-threshold should be disabled. By default, preemption-threshold is
-   enabled. If the application does not use preemption-threshold, it may be disabled to reduce
-   code size and improve performance.  */
-
-#define TX_DISABLE_PREEMPTION_THRESHOLD
-
-/* Determine if global ThreadX variables should be cleared. If the compiler startup code clears
-   the .bss section prior to ThreadX running, the define can be used to eliminate unnecessary
-   clearing of ThreadX global variables.  */
-
-/*#define TX_DISABLE_REDUNDANT_CLEARING*/
-
-/* Determine if no timer processing is required. This option will help eliminate the timer
-   processing when not needed. The user will also have to comment out the call to
-   tx_timer_interrupt, which is typically made from assembly language in
-   tx_initialize_low_level. Note: if TX_NO_TIMER is used, the define TX_TIMER_PROCESS_IN_ISR
-   must also be used.  */
-
-/*
-#define TX_NO_TIMER
-#ifndef TX_TIMER_PROCESS_IN_ISR
-#define TX_TIMER_PROCESS_IN_ISR
-#endif
-*/
-
-/* Determine if the notify callback option should be disabled. By default, notify callbacks are
-   enabled. If the application does not use notify callbacks, they may be disabled to reduce
-   code size and improve performance.  */
-
-#define TX_DISABLE_NOTIFY_CALLBACKS
-
-/*Defined, the basic parameter error checking is disabled.*/
-
-/*#define TX_DISABLE_ERROR_CHECKING*/
-
-/* Determine if the tx_thread_resume and tx_thread_suspend services should have their internal
-   code in-line. This results in a larger image, but improves the performance of the thread
-   resume and suspend services.  */
-
-/*#define TX_INLINE_THREAD_RESUME_SUSPEND*/
-
-/* Determine if the internal ThreadX code is non-interruptable. This results in smaller code
-   size and less processing overhead, but increases the interrupt lockout time.  */
-
-/*#define TX_NOT_INTERRUPTABLE*/
-
-/* Determine if the trace event logging code should be enabled. This causes slight increases in
-   code size and overhead, but provides the ability to generate system trace information which
-   is available for viewing in TraceX.  */
-
-/*#define TX_ENABLE_EVENT_TRACE*/
-
-/* Determine if block pool performance gathering is required by the application. When the following is
-   defined, ThreadX gathers various block pool performance information. */
-
-/*#define TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO*/
-
-/* Determine if byte pool performance gathering is required by the application. When the following is
-   defined, ThreadX gathers various byte pool performance information. */
-
-/*#define TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO*/
-
-/* Determine if event flags performance gathering is required by the application. When the following is
-   defined, ThreadX gathers various event flags performance information. */
-
-/*#define TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO*/
-
-/* Determine if mutex performance gathering is required by the application. When the following is
-   defined, ThreadX gathers various mutex performance information. */
-
-/*#define TX_MUTEX_ENABLE_PERFORMANCE_INFO*/
-
-/* Determine if queue performance gathering is required by the application. When the following is
-   defined, ThreadX gathers various queue performance information. */
-
-/*#define TX_QUEUE_ENABLE_PERFORMANCE_INFO*/
-
-/* Determine if semaphore performance gathering is required by the application. When the following is
-   defined, ThreadX gathers various semaphore performance information. */
-
-/*#define TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO*/
-
-/* Determine if thread performance gathering is required by the application. When the following is
-   defined, ThreadX gathers various thread performance information. */
-
-/*#define TX_THREAD_ENABLE_PERFORMANCE_INFO*/
-
-/* Determine if timer performance gathering is required by the application. When the following is
-   defined, ThreadX gathers various timer performance information. */
-
-/*#define TX_TIMER_ENABLE_PERFORMANCE_INFO*/
-
-/* Define the common timer tick reference for use by other middleware components. */
-
-#define TX_TIMER_TICKS_PER_SECOND                1000
-
-/* Determine if there is a FileX pointer in the thread control block.
-   By default, the pointer is there for legacy/backwards compatibility.
-   The pointer must also be there for applications using FileX.
-   Define this to save space in the thread control block.
-*/
-
-#define TX_NO_FILEX_POINTER
-
-#ifdef __ICCARM__
-/* Define if the IAR library is supported. */
-/*#define TX_ENABLE_IAR_LIBRARY_SUPPORT*/
-#endif
-
-/* Define if the safety critical configuration is enabled. */
-
-/*#define TX_SAFETY_CRITICAL*/
-
-/* Define the LowPower macros and flags */
-
-/* Define a macro that sets up a low power clock and keep track of time */
-void App_ThreadX_LowPower_Timer_Setup(unsigned long count);
-#define TX_LOW_POWER_TIMER_SETUP(_count) App_ThreadX_LowPower_Timer_Setup(_count)
-
-/* Define the TX_LOW_POWER_TICKLESS to disable the internal ticks */
-#define TX_LOW_POWER_TICKLESS
-
-/* A user defined macro to make the system enter low power mode */
-void App_ThreadX_LowPower_Enter(void);
-#define TX_LOW_POWER_USER_ENTER App_ThreadX_LowPower_Enter()
-
-/* A user defined macro to make the system exit low power mode */
-void App_ThreadX_LowPower_Exit(void);
-#define TX_LOW_POWER_USER_EXIT App_ThreadX_LowPower_Exit()
-
-/* User's low-power macro to obtain the amount of time (in ticks) the system has been in low power mode */
-unsigned long App_ThreadX_LowPower_Timer_Adjust(void);
-#define TX_LOW_POWER_USER_TIMER_ADJUST App_ThreadX_LowPower_Timer_Adjust()
-
-/* USER CODE BEGIN 2 */
-
-/* Define the user extension field of the thread control block.*/
-/*#define TX_THREAD_USER_EXTENSION                ????*/
-
-/* USER CODE END 2 */
-
-#endif
-
Index: ctrl/firmware/Main/CubeMX/Core/Src/app_threadx.c
===================================================================
--- ctrl/firmware/Main/CubeMX/Core/Src/app_threadx.c	(revision 69)
+++ 	(revision )
@@ -1,213 +1,0 @@
-/* USER CODE BEGIN Header */
-/**
-  ******************************************************************************
-  * @file    app_threadx.c
-  * @author  MCD Application Team
-  * @brief   ThreadX applicative file
-  ******************************************************************************
-  * @attention
-  *
-  * Copyright (c) 2020-2021 STMicroelectronics.
-  * All rights reserved.
-  *
-  * This software is licensed under terms that can be found in the LICENSE file
-  * in the root directory of this software component.
-  * If no LICENSE file comes with this software, it is provided AS-IS.
-  *
-  ******************************************************************************
-  */
-/* USER CODE END Header */
-
-/* Includes ------------------------------------------------------------------*/
-#include "app_threadx.h"
-
-/* Private includes ----------------------------------------------------------*/
-/* USER CODE BEGIN Includes */
-
-#include <stdint.h>
-#include <stdio.h>
-
-#include "tx_queue.h"
-
-#include "keys_thread.h"
-#include "gsm_thread.h"
-#include "gsm_rx_thread.h"
-#include "fan_thread.h"
-#include "eth_thread.h"
-
-/* USER CODE END Includes */
-
-/* Private typedef -----------------------------------------------------------*/
-/* USER CODE BEGIN PTD */
-
-/* USER CODE END PTD */
-
-/* Private define ------------------------------------------------------------*/
-/* USER CODE BEGIN PD */
-
-#define KEYS_THREAD_STACK_SIZE_BYTES		(1024U)
-#define GSM_THREAD_STACK_SIZE_BYTES			(1024U)
-#define GSM_RX_THREAD_STACK_SIZE_BYTES		(1024U)
-#define FAN_THREAD_STACK_SIZE_BYTES			(512U)
-#define ETH_THREAD_STACK_SIZE_BYTES			(2048U)
-
-/* USER CODE END PD */
-
-/* Private macro -------------------------------------------------------------*/
-/* USER CODE BEGIN PM */
-
-/* USER CODE END PM */
-
-/* Private variables ---------------------------------------------------------*/
-/* USER CODE BEGIN PV */
-
-TX_THREAD scan_keys_thread;
-TX_THREAD gsm_thread;
-TX_THREAD gsm_rx_thread;
-TX_THREAD fan_thread;
-TX_THREAD eth_thread;
-
-/* USER CODE END PV */
-
-/* Private function prototypes -----------------------------------------------*/
-/* USER CODE BEGIN PFP */
-
-/* USER CODE END PFP */
-
-/**
-  * @brief  Application ThreadX Initialization.
-  * @param memory_ptr: memory pointer
-  * @retval int
-  */
-UINT App_ThreadX_Init(VOID *memory_ptr)
-{
-  UINT ret = TX_SUCCESS;
-  /* USER CODE BEGIN App_ThreadX_MEM_POOL */
-
-  TX_BYTE_POOL *byte_pool = (TX_BYTE_POOL*)memory_ptr;
-  VOID *keys_thread_pointer;
-  VOID *gsm_thread_pointer;
-  VOID *gsm_rx_thread_pointer;
-  VOID *fan_thread_pointer;
-  VOID *eth_thread_pointer;
-
-  /* USER CODE END App_ThreadX_MEM_POOL */
-
-  /* USER CODE BEGIN App_ThreadX_Init */
-
-  // Allocate the stack for key thread
-  ret = tx_byte_allocate(byte_pool, &keys_thread_pointer, KEYS_THREAD_STACK_SIZE_BYTES, TX_NO_WAIT);
-  if (ret != TX_SUCCESS) { printf("Cannot allocate bytes of memory!\n"); return ret; }
-
-  char* scan_keys_thread_name = "Scan Keys Thread";
-  ret = tx_thread_create(&scan_keys_thread, scan_keys_thread_name, scanKeysThread, 0x0001, keys_thread_pointer, KEYS_THREAD_STACK_SIZE_BYTES, TX_MAX_PRIORITIES-1, TX_MAX_PRIORITIES-1, TX_NO_TIME_SLICE, TX_AUTO_START);
-  if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", scan_keys_thread_name); return ret; }
-
-
-  // Allocate the stack for gsm send thread
-  ret = tx_byte_allocate(byte_pool, &gsm_thread_pointer, GSM_THREAD_STACK_SIZE_BYTES, TX_NO_WAIT);
-  if (ret != TX_SUCCESS) { printf("Cannot allocate bytes of memory!\n"); return ret; }
-
-  char* gsm_thread_name = "GSM Thread";
-  ret = tx_thread_create(&gsm_thread, gsm_thread_name, gsmThread, 0x0001,	gsm_thread_pointer, GSM_THREAD_STACK_SIZE_BYTES, TX_MAX_PRIORITIES-1, TX_MAX_PRIORITIES-1, TX_NO_TIME_SLICE, TX_AUTO_START);
-  if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", gsm_thread_name); return ret; }
-
-  // Allocate the stack for gsm rx thread
-  ret = tx_byte_allocate(byte_pool, &gsm_rx_thread_pointer, GSM_RX_THREAD_STACK_SIZE_BYTES, TX_NO_WAIT);
-  if (ret != TX_SUCCESS) { printf("Cannot allocate bytes of memory!\n"); return ret; }
-
-  char* gsm_rx_thread_name = "GSM RX Thread";
-  ret = tx_thread_create(&gsm_rx_thread, gsm_rx_thread_name, gsmRxThread, 0x0001, gsm_rx_thread_pointer, GSM_RX_THREAD_STACK_SIZE_BYTES, TX_MAX_PRIORITIES-1, TX_MAX_PRIORITIES-1, TX_NO_TIME_SLICE, TX_AUTO_START);
-  if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", gsm_rx_thread_name); return ret; }
-
-  // Allocate the stack for fan control thread
-  ret = tx_byte_allocate(byte_pool, &fan_thread_pointer, FAN_THREAD_STACK_SIZE_BYTES, TX_NO_WAIT);
-  if (ret != TX_SUCCESS) { printf("Cannot allocate bytes of memory!\n"); return ret; }
-
-  char* fan_thread_name = "FAN Thread";
-  ret = tx_thread_create(&fan_thread, fan_thread_name, fanThread, 0x0001, fan_thread_pointer, FAN_THREAD_STACK_SIZE_BYTES, TX_MAX_PRIORITIES-1, TX_MAX_PRIORITIES-1, TX_NO_TIME_SLICE, TX_AUTO_START);
-  if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", fan_thread_name); return ret; }
-
-  // Allocate the stack for ethernet thread
-  ret = tx_byte_allocate(byte_pool, &eth_thread_pointer, ETH_THREAD_STACK_SIZE_BYTES, TX_NO_WAIT);
-  if (ret != TX_SUCCESS) { printf("Cannot allocate bytes of memory!\n"); return ret; }
-
-  char* eth_thread_name = "ETH Thread";
-  ret = tx_thread_create(&eth_thread, eth_thread_name, ethThread, 0x0001, eth_thread_pointer, ETH_THREAD_STACK_SIZE_BYTES, TX_MAX_PRIORITIES-1, TX_MAX_PRIORITIES-1, TX_NO_TIME_SLICE, TX_AUTO_START);
-  if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", fan_thread_name); return ret; }
-
-
-  /* USER CODE END App_ThreadX_Init */
-
-  return ret;
-}
-
-  /**
-  * @brief  Function that implements the kernel's initialization.
-  * @param  None
-  * @retval None
-  */
-void MX_ThreadX_Init(void)
-{
-  /* USER CODE BEGIN  Before_Kernel_Start */
-
-  /* USER CODE END  Before_Kernel_Start */
-
-  tx_kernel_enter();
-
-  /* USER CODE BEGIN  Kernel_Start_Error */
-
-  /* USER CODE END  Kernel_Start_Error */
-}
-
-/**
-  * @brief  App_ThreadX_LowPower_Timer_Setup
-  * @param  count : TX timer count
-  * @retval None
-  */
-void App_ThreadX_LowPower_Timer_Setup(ULONG count)
-{
-  /* USER CODE BEGIN  App_ThreadX_LowPower_Timer_Setup */
-
-  /* USER CODE END  App_ThreadX_LowPower_Timer_Setup */
-}
-
-/**
-  * @brief  App_ThreadX_LowPower_Enter
-  * @param  None
-  * @retval None
-  */
-void App_ThreadX_LowPower_Enter(void)
-{
-  /* USER CODE BEGIN  App_ThreadX_LowPower_Enter */
-
-  /* USER CODE END  App_ThreadX_LowPower_Enter */
-}
-
-/**
-  * @brief  App_ThreadX_LowPower_Exit
-  * @param  None
-  * @retval None
-  */
-void App_ThreadX_LowPower_Exit(void)
-{
-  /* USER CODE BEGIN  App_ThreadX_LowPower_Exit */
-
-  /* USER CODE END  App_ThreadX_LowPower_Exit */
-}
-
-/**
-  * @brief  App_ThreadX_LowPower_Timer_Adjust
-  * @param  None
-  * @retval Amount of time (in ticks)
-  */
-ULONG App_ThreadX_LowPower_Timer_Adjust(void)
-{
-  /* USER CODE BEGIN  App_ThreadX_LowPower_Timer_Adjust */
-  return 0;
-  /* USER CODE END  App_ThreadX_LowPower_Timer_Adjust */
-}
-
-/* USER CODE BEGIN 1 */
-
-/* USER CODE END 1 */
Index: ctrl/firmware/Main/CubeMX/Core/Src/main.c
===================================================================
--- ctrl/firmware/Main/CubeMX/Core/Src/main.c	(revision 69)
+++ ctrl/firmware/Main/CubeMX/Core/Src/main.c	(revision 70)
@@ -18,5 +18,4 @@
 /* USER CODE END Header */
 /* Includes ------------------------------------------------------------------*/
-#include "app_threadx.h"
 #include "main.h"
 #include "dma.h"
@@ -126,8 +125,4 @@
 #undef MX_SDMMC1_SD_Init
   /* USER CODE END 2 */
-
-  MX_ThreadX_Init();
-
-  /* We should never get here as control is now taken by the scheduler */
 
   /* Infinite loop */
Index: ctrl/firmware/Main/CubeMX/Core/Src/sdmmc.c
===================================================================
--- ctrl/firmware/Main/CubeMX/Core/Src/sdmmc.c	(revision 69)
+++ ctrl/firmware/Main/CubeMX/Core/Src/sdmmc.c	(revision 70)
@@ -49,6 +49,5 @@
   if (HAL_SD_Init(&hsd1) != HAL_OK)
   {
-    //Error_Handler();
-	printf("Cannot initialize SD-card!\n");
+    Error_Handler();
   }
   /* USER CODE BEGIN SDMMC1_Init 2 */
Index: ctrl/firmware/Main/CubeMX/Core/Src/stm32h7xx_it.c
===================================================================
--- ctrl/firmware/Main/CubeMX/Core/Src/stm32h7xx_it.c	(revision 69)
+++ ctrl/firmware/Main/CubeMX/Core/Src/stm32h7xx_it.c	(revision 70)
@@ -153,4 +153,17 @@
 
 /**
+  * @brief This function handles System service call via SWI instruction.
+  */
+void SVC_Handler(void)
+{
+  /* USER CODE BEGIN SVCall_IRQn 0 */
+
+  /* USER CODE END SVCall_IRQn 0 */
+  /* USER CODE BEGIN SVCall_IRQn 1 */
+
+  /* USER CODE END SVCall_IRQn 1 */
+}
+
+/**
   * @brief This function handles Debug monitor.
   */
@@ -163,4 +176,31 @@
 
   /* USER CODE END DebugMonitor_IRQn 1 */
+}
+
+/**
+  * @brief This function handles Pendable request for system service.
+  */
+void PendSV_Handler(void)
+{
+  /* USER CODE BEGIN PendSV_IRQn 0 */
+
+  /* USER CODE END PendSV_IRQn 0 */
+  /* USER CODE BEGIN PendSV_IRQn 1 */
+
+  /* USER CODE END PendSV_IRQn 1 */
+}
+
+/**
+  * @brief This function handles System tick timer.
+  */
+void SysTick_Handler(void)
+{
+  /* USER CODE BEGIN SysTick_IRQn 0 */
+
+  /* USER CODE END SysTick_IRQn 0 */
+
+  /* USER CODE BEGIN SysTick_IRQn 1 */
+
+  /* USER CODE END SysTick_IRQn 1 */
 }
 
Index: ctrl/firmware/Main/CubeMX/Core/Src/tx_initialize_low_level.S
===================================================================
--- ctrl/firmware/Main/CubeMX/Core/Src/tx_initialize_low_level.S	(revision 69)
+++ 	(revision )
@@ -1,665 +1,0 @@
-
-// by default AzureRTOS is configured to use static byte pool for
-// allocation, in case dynamic allocation is to be used, uncomment
-// the define below and update the linker files to define the following symbols
-// EWARM toolchain:
-//       place in RAM_region    { last section FREE_MEM};
-// MDK-ARM toolchain;
-//       either define the RW_IRAM1 region in the ".sct" file or modify this file by referring to the correct memory region.
-//         LDR r1, =|Image$$RW_IRAM1$$ZI$$Limit|
-// STM32CubeIDE toolchain:
-//       ._threadx_heap :
-//       {
-//        . = ALIGN(8);
-//        __RAM_segment_used_end__ = .;
-//        . = . + 64K;
-//        . = ALIGN(8);
-//       } >RAM_D1 AT> RAM_D1
-//  The simplest way to provide memory for ThreadX is to define a new section, see ._threadx_heap above.
-//  In the example above the ThreadX heap size is set to 64KBytes.
-//  The ._threadx_heap must be located between the .bss and the ._user_heap_stack sections in the linker script.
-//  Caution: Make sure that ThreadX does not need more than the provided heap memory (64KBytes in this example).
-//  Read more in STM32CubeIDE User Guide, chapter: "Linker script".
-
-//#define USE_DYNAMIC_MEMORY_ALLOCATION
-
-#if defined(__clang__)
-@/**************************************************************************/
-@/*                                                                        */
-@/*       Copyright (c) Microsoft Corporation. All rights reserved.        */
-@/*                                                                        */
-@/*       This software is licensed under the Microsoft Software License   */
-@/*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
-@/*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
-@/*       and in the root directory of this software.                      */
-@/*                                                                        */
-@/**************************************************************************/
-@
-@
-@/**************************************************************************/
-@/**************************************************************************/
-@/**                                                                       */
-@/** ThreadX Component                                                     */
-@/**                                                                       */
-@/**   Initialize                                                          */
-@/**                                                                       */
-@/**************************************************************************/
-@/**************************************************************************/
-@
-@
-    .global     _tx_thread_system_stack_ptr
-    .global     _tx_initialize_unused_memory
-    .global     _tx_timer_interrupt
-    .global     __main
-    .global     __tx_SVCallHandler
-    .global     __tx_PendSVHandler
-    .global     __tx_NMIHandler                     @ NMI
-    .global     __tx_BadHandler                     @ HardFault
-    .global     __tx_SVCallHandler                  @ SVCall
-    .global     __tx_DBGHandler                     @ Monitor
-    .global     __tx_PendSVHandler                  @ PendSV
-    .global     __tx_SysTickHandler                 @ SysTick
-    .global     __tx_IntHandler                     @ Int 0
-#ifdef USE_DYNAMIC_MEMORY_ALLOCATION
-    .global     Image$$RW_IRAM1$$ZI$$Limit
-#endif
-    .global     __Vectors
-@
-@
-SYSTEM_CLOCK      =   100000000
-SYSTICK_CYCLES    =   ((SYSTEM_CLOCK / 1000) -1)
-
-    .text 32
-    .align 4
-    .syntax unified
-@/**************************************************************************/
-@/*                                                                        */
-@/*  FUNCTION                                               RELEASE        */
-@/*                                                                        */
-@/*    _tx_initialize_low_level                          Cortex-M7/AC6     */
-@/*                                                           6.1          */
-@/*  AUTHOR                                                                */
-@/*                                                                        */
-@/*    William E. Lamie, Microsoft Corporation                             */
-@/*                                                                        */
-@/*  DESCRIPTION                                                           */
-@/*                                                                        */
-@/*    This function is responsible for any low-level processor            */
-@/*    initialization, including setting up interrupt vectors, setting     */
-@/*    up a periodic timer interrupt source, saving the system stack       */
-@/*    pointer for use in ISR processing later, and finding the first      */
-@/*    available RAM memory address for tx_application_define.             */
-@/*                                                                        */
-@/*  INPUT                                                                 */
-@/*                                                                        */
-@/*    None                                                                */
-@/*                                                                        */
-@/*  OUTPUT                                                                */
-@/*                                                                        */
-@/*    None                                                                */
-@/*                                                                        */
-@/*  CALLS                                                                 */
-@/*                                                                        */
-@/*    None                                                                */
-@/*                                                                        */
-@/*  CALLED BY                                                             */
-@/*                                                                        */
-@/*    _tx_initialize_kernel_enter           ThreadX entry function        */
-@/*                                                                        */
-@/*  RELEASE HISTORY                                                       */
-@/*                                                                        */
-@/*    DATE              NAME                      DESCRIPTION             */
-@/*                                                                        */
-@/*  09-30-2020     William E. Lamie         Initial Version 6.1           */
-@/*                                                                        */
-@/**************************************************************************/
-@VOID   _tx_initialize_low_level(VOID)
-@{
-    .global  _tx_initialize_low_level
-    .thumb_func
-_tx_initialize_low_level:
-@
-@    /* Disable interrupts during ThreadX initialization.  */
-@
-    CPSID   i
-@
-@    /* Set base of available memory to end of non-initialised RAM area.  */
-@
-#ifdef USE_DYNAMIC_MEMORY_ALLOCATION
-    LDR     r0, =_tx_initialize_unused_memory       @ Build address of unused memory pointer
-    LDR     r1, = Image$$RW_IRAM1$$ZI$$Limit        @ Build first free address
-    ADD     r1, r1, #4                              @
-    STR     r1, [r0]                                @ Setup first unused memory pointer
-#endif
-@
-@    /* Setup Vector Table Offset Register.  */
-@
-    MOV     r0, #0xE000E000                         @ Build address of NVIC registers
-    LDR     r1, =__Vectors                          @ Pickup address of vector table
-    STR     r1, [r0, #0xD08]                        @ Set vector table address
-@
-@    /* Set system stack pointer from vector value.  */
-@
-    LDR     r0, =_tx_thread_system_stack_ptr        @ Build address of system stack pointer
-    LDR     r1, =__Vectors                          @ Pickup address of vector table
-    LDR     r1, [r1]                                @ Pickup reset stack pointer
-    STR     r1, [r0]                                @ Save system stack pointer
-@
-@    /* Enable the cycle count register.  */
-@
-    LDR     r0, =0xE0001000                         @ Build address of DWT register
-    LDR     r1, [r0]                                @ Pickup the current value
-    ORR     r1, r1, #1                              @ Set the CYCCNTENA bit
-    STR     r1, [r0]                                @ Enable the cycle count register
-@
-@    /* Configure SysTick for 100Hz clock, or 16384 cycles if no reference.  */
-@
-    MOV     r0, #0xE000E000                         @ Build address of NVIC registers
-    LDR     r1, =SYSTICK_CYCLES
-    STR     r1, [r0, #0x14]                         @ Setup SysTick Reload Value
-    MOV     r1, #0x7                                @ Build SysTick Control Enable Value
-    STR     r1, [r0, #0x10]                         @ Setup SysTick Control
-@
-@    /* Configure handler priorities.  */
-@
-    LDR     r1, =0x00000000                         @ Rsrv, UsgF, BusF, MemM
-    STR     r1, [r0, #0xD18]                        @ Setup System Handlers 4-7 Priority Registers
-
-    LDR     r1, =0xFF000000                         @ SVCl, Rsrv, Rsrv, Rsrv
-    STR     r1, [r0, #0xD1C]                        @ Setup System Handlers 8-11 Priority Registers
-                                                    @ Note: SVC must be lowest priority, which is 0xFF
-
-    LDR     r1, =0x40FF0000                         @ SysT, PnSV, Rsrv, DbgM
-    STR     r1, [r0, #0xD20]                        @ Setup System Handlers 12-15 Priority Registers
-                                                    @ Note: PnSV must be lowest priority, which is 0xFF
-@
-@    /* Return to caller.  */
-@
-    BX      lr
-@}
-@
-
-@/* Define shells for each of the unused vectors.  */
-@
-    .global  __tx_BadHandler
-    .thumb_func
-__tx_BadHandler:
-    B       __tx_BadHandler
-
-@ /* added to catch the hardfault */
-
-    .global  __tx_HardfaultHandler
-    .thumb_func
-__tx_HardfaultHandler:
-    B       __tx_HardfaultHandler
-
-@ /* added to catch the SVC */
-
-    .global  __tx_SVCallHandler
-    .thumb_func
-__tx_SVCallHandler:
-    B       __tx_SVCallHandler
-
-@ /* Generic interrupt handler template */
-    .global  __tx_IntHandler
-    .thumb_func
-__tx_IntHandler:
-@ VOID InterruptHandler (VOID)
-@ {
-    PUSH    {r0, lr}
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_enter             @ Call the ISR enter function
-#endif
-
-@    /* Do interrupt handler work here */
-@    /* BL <your C Function>.... */
-
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_exit              @ Call the ISR exit function
-#endif
-    POP     {r0, lr}
-    BX      LR
-@ }
-
-@ /* System Tick timer interrupt handler */
-    .global  __tx_SysTickHandler
-    .global  SysTick_Handler
-    .thumb_func
-__tx_SysTickHandler:
-    .thumb_func
-SysTick_Handler:
-@ VOID TimerInterruptHandler (VOID)
-@ {
-@
-    PUSH    {r0, lr}
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_enter             @ Call the ISR enter function
-#endif
-    BL      _tx_timer_interrupt
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_exit              @ Call the ISR exit function
-#endif
-    POP     {r0, lr}
-    BX      LR
-@ }
-
-@ /* NMI, DBG handlers */
-    .global  __tx_NMIHandler
-    .thumb_func
-__tx_NMIHandler:
-    B       __tx_NMIHandler
-
-    .global  __tx_DBGHandler
-    .thumb_func
-__tx_DBGHandler:
-    B       __tx_DBGHandler
-.end
-#endif
-
-#ifdef __IAR_SYSTEMS_ASM__
-;/**************************************************************************/
-;/*                                                                        */
-;/*       Copyright (c) Microsoft Corporation. All rights reserved.        */
-;/*                                                                        */
-;/*       This software is licensed under the Microsoft Software License   */
-;/*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
-;/*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
-;/*       and in the root directory of this software.                      */
-;/*                                                                        */
-;/**************************************************************************/
-;
-;
-;/**************************************************************************/
-;/**************************************************************************/
-;/**                                                                       */
-;/** ThreadX Component                                                     */
-;/**                                                                       */
-;/**   Initialize                                                          */
-;/**                                                                       */
-;/**************************************************************************/
-;/**************************************************************************/
-;
-    EXTERN  _tx_thread_system_stack_ptr
-    EXTERN  _tx_initialize_unused_memory
-    EXTERN  _tx_timer_interrupt
-    EXTERN  __vector_table
-    EXTERN  _tx_execution_isr_enter
-    EXTERN  _tx_execution_isr_exit
-;
-;
-SYSTEM_CLOCK      EQU   100000000
-SYSTICK_CYCLES    EQU   ((SYSTEM_CLOCK / 1000) -1)
-#ifdef USE_DYNAMIC_MEMORY_ALLOCATION
-    RSEG    FREE_MEM:DATA
-    PUBLIC  __tx_free_memory_start
-__tx_free_memory_start
-    DS32    4
-#endif
-;
-;
-    SECTION `.text`:CODE:NOROOT(2)
-    THUMB
-;/**************************************************************************/
-;/*                                                                        */
-;/*  FUNCTION                                               RELEASE        */
-;/*                                                                        */
-;/*    _tx_initialize_low_level                          Cortex-M7/IAR     */
-;/*                                                           6.1          */
-;/*  AUTHOR                                                                */
-;/*                                                                        */
-;/*    William E. Lamie, Microsoft Corporation                             */
-;/*                                                                        */
-;/*  DESCRIPTION                                                           */
-;/*                                                                        */
-;/*    This function is responsible for any low-level processor            */
-;/*    initialization, including setting up interrupt vectors, setting     */
-;/*    up a periodic timer interrupt source, saving the system stack       */
-;/*    pointer for use in ISR processing later, and finding the first      */
-;/*    available RAM memory address for tx_application_define.             */
-;/*                                                                        */
-;/*  INPUT                                                                 */
-;/*                                                                        */
-;/*    None                                                                */
-;/*                                                                        */
-;/*  OUTPUT                                                                */
-;/*                                                                        */
-;/*    None                                                                */
-;/*                                                                        */
-;/*  CALLS                                                                 */
-;/*                                                                        */
-;/*    None                                                                */
-;/*                                                                        */
-;/*  CALLED BY                                                             */
-;/*                                                                        */
-;/*    _tx_initialize_kernel_enter           ThreadX entry function        */
-;/*                                                                        */
-;/*  RELEASE HISTORY                                                       */
-;/*                                                                        */
-;/*    DATE              NAME                      DESCRIPTION             */
-;/*                                                                        */
-;/*  09-30-2020     William E. Lamie         Initial Version 6.1           */
-;/*                                                                        */
-;/**************************************************************************/
-;VOID   _tx_initialize_low_level(VOID)
-;{
-    PUBLIC  _tx_initialize_low_level
-_tx_initialize_low_level:
-;
-;    /* Ensure that interrupts are disabled.  */
-;
-    CPSID   i                                       ; Disable interrupts
-;
-;
-;    /* Set base of available memory to end of non-initialised RAM area.  */
-;
-#ifdef USE_DYNAMIC_MEMORY_ALLOCATION
-
-    LDR     r0, =__tx_free_memory_start             ; Get end of non-initialized RAM area
-    LDR     r2, =_tx_initialize_unused_memory       ; Build address of unused memory pointer
-    STR     r0, [r2, #0]                            ; Save first free memory address
-#endif
-;
-;    /* Enable the cycle count register.  */
-;
-    LDR     r0, =0xE0001000                         ; Build address of DWT register
-    LDR     r1, [r0]                                ; Pickup the current value
-    ORR     r1, r1, #1                              ; Set the CYCCNTENA bit
-    STR     r1, [r0]                                ; Enable the cycle count register
-;
-;    /* Setup Vector Table Offset Register.  */
-;
-    MOV     r0, #0xE000E000                         ; Build address of NVIC registers
-    LDR     r1, =__vector_table                     ; Pickup address of vector table
-    STR     r1, [r0, #0xD08]                        ; Set vector table address
-;
-;    /* Set system stack pointer from vector value.  */
-;
-    LDR     r0, =_tx_thread_system_stack_ptr        ; Build address of system stack pointer
-    LDR     r1, =__vector_table                     ; Pickup address of vector table
-    LDR     r1, [r1]                                ; Pickup reset stack pointer
-    STR     r1, [r0]                                ; Save system stack pointer
-;
-;    /* Configure SysTick.  */
-;
-    MOV     r0, #0xE000E000                         ; Build address of NVIC registers
-    LDR     r1, =SYSTICK_CYCLES
-    STR     r1, [r0, #0x14]                         ; Setup SysTick Reload Value
-    MOV     r1, #0x7                                ; Build SysTick Control Enable Value
-    STR     r1, [r0, #0x10]                         ; Setup SysTick Control
-;
-;    /* Configure handler priorities.  */
-;
-    LDR     r1, =0x00000000                         ; Rsrv, UsgF, BusF, MemM
-    STR     r1, [r0, #0xD18]                        ; Setup System Handlers 4-7 Priority Registers
-
-    LDR     r1, =0xFF000000                         ; SVCl, Rsrv, Rsrv, Rsrv
-    STR     r1, [r0, #0xD1C]                        ; Setup System Handlers 8-11 Priority Registers
-                                                    ; Note: SVC must be lowest priority, which is 0xFF
-
-    LDR     r1, =0x40FF0000                         ; SysT, PnSV, Rsrv, DbgM
-    STR     r1, [r0, #0xD20]                        ; Setup System Handlers 12-15 Priority Registers
-                                                    ; Note: PnSV must be lowest priority, which is 0xFF
-;
-;    /* Return to caller.  */
-;
-    BX      lr
-;}
-;
-;
-    PUBLIC  SysTick_Handler
-    PUBLIC  __tx_SysTickHandler
-__tx_SysTickHandler:
-SysTick_Handler:
-;
-; VOID SysTick_Handler (VOID)
-; {
-;
-    PUSH    {r0, lr}
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_enter             ; Call the ISR enter function
-#endif
-    BL      _tx_timer_interrupt
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_exit              ; Call the ISR exit function
-#endif
-    POP     {r0, lr}
-    BX      LR
-; }
-    END
-#endif
-
-#if defined (__GNUC__) && !defined(__clang__)
-@/**************************************************************************/
-@/*                                                                        */
-@/*       Copyright (c) Microsoft Corporation. All rights reserved.        */
-@/*                                                                        */
-@/*       This software is licensed under the Microsoft Software License   */
-@/*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
-@/*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
-@/*       and in the root directory of this software.                      */
-@/*                                                                        */
-@/**************************************************************************/
-@
-@
-@/**************************************************************************/
-@/**************************************************************************/
-@/**                                                                       */
-@/** ThreadX Component                                                     */
-@/**                                                                       */
-@/**   Initialize                                                          */
-@/**                                                                       */
-@/**************************************************************************/
-@/**************************************************************************/
-@
-@
-    .global     _tx_thread_system_stack_ptr
-    .global     _tx_initialize_unused_memory
-    .global     __RAM_segment_used_end__
-    .global     _tx_timer_interrupt
-    .global     __main
-    .global     __tx_SVCallHandler
-    .global     __tx_PendSVHandler
-    .global     _vectors
-    .global     __tx_NMIHandler                     @ NMI
-    .global     __tx_BadHandler                     @ HardFault
-    .global     __tx_SVCallHandler                  @ SVCall
-    .global     __tx_DBGHandler                     @ Monitor
-    .global     __tx_PendSVHandler                  @ PendSV
-    .global     __tx_SysTickHandler                 @ SysTick
-    .global     __tx_IntHandler                     @ Int 0
-@
-@
-
-SYSTEM_CLOCK      =   100000000
-SYSTICK_CYCLES    =   ((SYSTEM_CLOCK / 1000) -1)
-
-    .text 32
-    .align 4
-    .syntax unified
-@/**************************************************************************/
-@/*                                                                        */
-@/*  FUNCTION                                               RELEASE        */
-@/*                                                                        */
-@/*    _tx_initialize_low_level                          Cortex-M7/GNU     */
-@/*                                                           6.1          */
-@/*  AUTHOR                                                                */
-@/*                                                                        */
-@/*    William E. Lamie, Microsoft Corporation                             */
-@/*                                                                        */
-@/*  DESCRIPTION                                                           */
-@/*                                                                        */
-@/*    This function is responsible for any low-level processor            */
-@/*    initialization, including setting up interrupt vectors, setting     */
-@/*    up a periodic timer interrupt source, saving the system stack       */
-@/*    pointer for use in ISR processing later, and finding the first      */
-@/*    available RAM memory address for tx_application_define.             */
-@/*                                                                        */
-@/*  INPUT                                                                 */
-@/*                                                                        */
-@/*    None                                                                */
-@/*                                                                        */
-@/*  OUTPUT                                                                */
-@/*                                                                        */
-@/*    None                                                                */
-@/*                                                                        */
-@/*  CALLS                                                                 */
-@/*                                                                        */
-@/*    None                                                                */
-@/*                                                                        */
-@/*  CALLED BY                                                             */
-@/*                                                                        */
-@/*    _tx_initialize_kernel_enter           ThreadX entry function        */
-@/*                                                                        */
-@/*  RELEASE HISTORY                                                       */
-@/*                                                                        */
-@/*    DATE              NAME                      DESCRIPTION             */
-@/*                                                                        */
-@/*  05-19-2020     William E. Lamie         Initial Version 6.0           */
-@/*  09-30-2020     William E. Lamie         Modified Comment(s), fixed    */
-@/*                                            GNU assembly comment, clean */
-@/*                                            up whitespace, resulting    */
-@/*                                            in version 6.1              */
-@/*                                                                        */
-@/**************************************************************************/
-@VOID   _tx_initialize_low_level(VOID)
-@{
-    .global  _tx_initialize_low_level
-    .thumb_func
-_tx_initialize_low_level:
-@
-@    /* Disable interrupts during ThreadX initialization.  */
-@
-    CPSID   i
-@
-@    /* Set base of available memory to end of non-initialised RAM area.  */
-@
-#ifdef USE_DYNAMIC_MEMORY_ALLOCATION
-    LDR     r0, =_tx_initialize_unused_memory       @ Build address of unused memory pointer
-    LDR     r1, =__RAM_segment_used_end__           @ Build first free address
-    ADD     r1, r1, #4                              @
-    STR     r1, [r0]                                @ Setup first unused memory pointer
-#endif
-@
-@    /* Setup Vector Table Offset Register.  */
-@
-    MOV     r0, #0xE000E000                         @ Build address of NVIC registers
-    LDR     r1, =_vectors                           @ Pickup address of vector table
-    STR     r1, [r0, #0xD08]                        @ Set vector table address
-@
-@    /* Set system stack pointer from vector value.  */
-@
-    LDR     r0, =_tx_thread_system_stack_ptr        @ Build address of system stack pointer
-    LDR     r1, =_vectors                           @ Pickup address of vector table
-    LDR     r1, [r1]                                @ Pickup reset stack pointer
-    STR     r1, [r0]                                @ Save system stack pointer
-@
-@    /* Enable the cycle count register.  */
-@
-    LDR     r0, =0xE0001000                         @ Build address of DWT register
-    LDR     r1, [r0]                                @ Pickup the current value
-    ORR     r1, r1, #1                              @ Set the CYCCNTENA bit
-    STR     r1, [r0]                                @ Enable the cycle count register
-@
-@    /* Configure SysTick for 100Hz clock, or 16384 cycles if no reference.  */
-@
-    MOV     r0, #0xE000E000                         @ Build address of NVIC registers
-    LDR     r1, =SYSTICK_CYCLES
-    STR     r1, [r0, #0x14]                         @ Setup SysTick Reload Value
-    MOV     r1, #0x7                                @ Build SysTick Control Enable Value
-    STR     r1, [r0, #0x10]                         @ Setup SysTick Control
-@
-@    /* Configure handler priorities.  */
-@
-    LDR     r1, =0x00000000                         @ Rsrv, UsgF, BusF, MemM
-    STR     r1, [r0, #0xD18]                        @ Setup System Handlers 4-7 Priority Registers
-
-    LDR     r1, =0xFF000000                         @ SVCl, Rsrv, Rsrv, Rsrv
-    STR     r1, [r0, #0xD1C]                        @ Setup System Handlers 8-11 Priority Registers
-                                                    @ Note: SVC must be lowest priority, which is 0xFF
-
-    LDR     r1, =0x40FF0000                         @ SysT, PnSV, Rsrv, DbgM
-    STR     r1, [r0, #0xD20]                        @ Setup System Handlers 12-15 Priority Registers
-                                                    @ Note: PnSV must be lowest priority, which is 0xFF
-@
-@    /* Return to caller.  */
-@
-    BX      lr
-@}
-@
-
-@/* Define shells for each of the unused vectors.  */
-@
-    .global  __tx_BadHandler
-    .thumb_func
-__tx_BadHandler:
-    B       __tx_BadHandler
-
-@ /* added to catch the hardfault */
-
-    .global  __tx_HardfaultHandler
-    .thumb_func
-__tx_HardfaultHandler:
-    B       __tx_HardfaultHandler
-
-@ /* added to catch the SVC */
-
-    .global  __tx_SVCallHandler
-    .thumb_func
-__tx_SVCallHandler:
-    B       __tx_SVCallHandler
-
-@ /* Generic interrupt handler template */
-    .global  __tx_IntHandler
-    .thumb_func
-__tx_IntHandler:
-@ VOID InterruptHandler (VOID)
-@ {
-    PUSH    {r0, lr}
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_enter             @ Call the ISR enter function
-#endif
-
-@    /* Do interrupt handler work here */
-@    /* BL <your C Function>.... */
-
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_exit              @ Call the ISR exit function
-#endif
-    POP     {r0, lr}
-    BX      LR
-@ }
-
-@ /* System Tick timer interrupt handler */
-    .global  __tx_SysTickHandler
-    .global  SysTick_Handler
-    .thumb_func
-__tx_SysTickHandler:
-    .thumb_func
-SysTick_Handler:
-@ VOID TimerInterruptHandler (VOID)
-@ {
-@
-    PUSH    {r0, lr}
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_enter             @ Call the ISR enter function
-#endif
-    BL      _tx_timer_interrupt
-#ifdef TX_EXECUTION_PROFILE_ENABLE
-    BL      _tx_execution_isr_exit              @ Call the ISR exit function
-#endif
-    POP     {r0, lr}
-    BX      LR
-@ }
-
-@ /* NMI, DBG handlers */
-    .global  __tx_NMIHandler
-    .thumb_func
-__tx_NMIHandler:
-    B       __tx_NMIHandler
-
-    .global  __tx_DBGHandler
-    .thumb_func
-__tx_DBGHandler:
-    B       __tx_DBGHandler
-
-#endif
Index: ctrl/firmware/Main/CubeMX/charger.ioc
===================================================================
--- ctrl/firmware/Main/CubeMX/charger.ioc	(revision 69)
+++ ctrl/firmware/Main/CubeMX/charger.ioc	(revision 70)
@@ -128,8 +128,4 @@
 Mcu.Pin42=VP_TIM8_VS_ClockSourceINT
 Mcu.Pin43=VP_MEMORYMAP_VS_MEMORYMAP
-Mcu.Pin44=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_RTOSJjThreadX_6.4.0_3.3.0
-Mcu.Pin45=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjFileX_6.4.0_3.3.0
-Mcu.Pin46=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjInterfaces_3.3.0_3.3.0
-Mcu.Pin47=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_NetworkJjNetXDuo_6.4.0_3.3.0
 Mcu.Pin5=PF15
 Mcu.Pin6=PG0
@@ -137,5 +133,5 @@
 Mcu.Pin8=PE7
 Mcu.Pin9=PE11
-Mcu.PinsNb=48
+Mcu.PinsNb=44
 Mcu.ThirdParty0=STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0
 Mcu.ThirdPartyNb=1
@@ -144,29 +140,26 @@
 MxCube.Version=6.13.0
 MxDb.Version=DB.6.0.130
-NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
-NVIC.DMA1_Stream0_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true\:true
-NVIC.DMA1_Stream1_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:true\:true
-NVIC.DMA1_Stream2_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:true\:true
-NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
+NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
+NVIC.DMA1_Stream0_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
+NVIC.DMA1_Stream1_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
+NVIC.DMA1_Stream2_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
+NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
 NVIC.ForceEnableDMAVector=true
-NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
-NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
-NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
-NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:false\:false
+NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
+NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
+NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
+NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
 NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
-NVIC.SDMMC1_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
-NVIC.SPI4_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true\:true
-NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:false\:false
-NVIC.SavedPendsvIrqHandlerGenerated=true
-NVIC.SavedSvcallIrqHandlerGenerated=true
-NVIC.SavedSystickIrqHandlerGenerated=true
-NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:true\:false
-NVIC.TIM3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
-NVIC.TIM7_IRQn=true\:15\:0\:false\:false\:true\:false\:false\:true\:true
-NVIC.TIM8_CC_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
+NVIC.SDMMC1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
+NVIC.SPI4_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
+NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
+NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:false
+NVIC.TIM3_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
+NVIC.TIM7_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:true
+NVIC.TIM8_CC_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
 NVIC.TimeBase=TIM7_IRQn
 NVIC.TimeBaseIP=TIM7
-NVIC.USART3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
-NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
+NVIC.USART3_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
+NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
 PA13(JTMS/SWDIO).Mode=Serial_Wire
 PA13(JTMS/SWDIO).Signal=DEBUG_JTMS-SWDIO
@@ -433,13 +426,8 @@
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FX_FAULT_TOLERANT=1
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FX_FAULT_TOLERANT_DATA=1
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FileOoSystemJjFileX_Checked=true
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FileOoSystemJjInterfaces_Checked=true
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FileXCcFileOoSystemJjFileXJjCore=true
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.IPParameters=TX_APP_MEM_POOL_SIZE,FX_APP_MEM_POOL_SIZE,TX_APP_GENERATE_INIT_CODE,TX_APP_CREATION,TX_ENABLE_STACK_CHECKING,TX_NO_FILEX_POINTER,TX_LOW_POWER,FX_ENABLE_EXFAT,FX_ENABLE_FAULT_TOLERANT,FX_FAULT_TOLERANT,FX_FAULT_TOLERANT_DATA,FX_DRIVER_SD_INIT,TX_TIMER_TICKS_PER_SECOND,TX_APP_MSG_QUEUE_CREATION,TX_MSG_QUEUE_NAME,TX_NB_MSG,ThreadXCcRTOSJjThreadXJjCore,ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport,FileXCcFileOoSystemJjFileXJjCore,InterfacesCcFileOoSystemJjFileXOoSDOointerface,NetXDuoCcNetworkJjNetXDuoJjNXOoCore
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.InterfacesCcFileOoSystemJjFileXOoSDOointerface=true
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.NetXDuoCcNetworkJjNetXDuoJjNXOoCore=true
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.NetworkJjInterfaces_Checked=false
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.NetworkJjNetXDuo_Checked=true
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.RTOSJjThreadX_Checked=true
+STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FileOoSystemJjFileX_Checked=false
+STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FileOoSystemJjInterfaces_Checked=false
+STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.IPParameters=TX_APP_MEM_POOL_SIZE,FX_APP_MEM_POOL_SIZE,TX_APP_GENERATE_INIT_CODE,TX_APP_CREATION,TX_ENABLE_STACK_CHECKING,TX_NO_FILEX_POINTER,TX_LOW_POWER,FX_ENABLE_EXFAT,FX_ENABLE_FAULT_TOLERANT,FX_FAULT_TOLERANT,FX_FAULT_TOLERANT_DATA,FX_DRIVER_SD_INIT,TX_TIMER_TICKS_PER_SECOND,TX_APP_MSG_QUEUE_CREATION,TX_MSG_QUEUE_NAME,TX_NB_MSG
+STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.RTOSJjThreadX_Checked=false
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.TX_APP_CREATION=0
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.TX_APP_GENERATE_INIT_CODE=false
@@ -452,8 +440,6 @@
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.TX_NO_FILEX_POINTER=1
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.TX_TIMER_TICKS_PER_SECOND=1000
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.ThreadXCcRTOSJjThreadXJjCore=true
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport=true
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_IsAnAzureRtosMw=true
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_SwParameter=InterfacesCcFileOoSystemJjFileXOoSDOointerface\:true;ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport\:true;NetXDuoCcNetworkJjNetXDuoJjNXOoCore\:true;InterfacesCcNetworkJjCustomOoInterface\:true;FileXCcFileOoSystemJjFileXJjCore\:true;ThreadXCcRTOSJjThreadXJjCore\:true;
+STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_SwParameter=InterfacesCcFileOoSystemJjFileXOoSDOointerface\:true;ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport\:true;FileXCcFileOoSystemJjFileXJjCore\:true;ThreadXCcRTOSJjThreadXJjCore\:true;
 TIM3.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_ENABLE
 TIM3.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2
@@ -477,12 +463,4 @@
 VP_RTC_VS_RTC_Activate.Mode=RTC_Enabled
 VP_RTC_VS_RTC_Activate.Signal=RTC_VS_RTC_Activate
-VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjFileX_6.4.0_3.3.0.Mode=FileOoSystemJjFileX
-VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjFileX_6.4.0_3.3.0.Signal=STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjFileX_6.4.0_3.3.0
-VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjInterfaces_3.3.0_3.3.0.Mode=FileOoSystemJjInterfaces
-VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjInterfaces_3.3.0_3.3.0.Signal=STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjInterfaces_3.3.0_3.3.0
-VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_NetworkJjNetXDuo_6.4.0_3.3.0.Mode=NetworkJjNetXDuo
-VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_NetworkJjNetXDuo_6.4.0_3.3.0.Signal=STMicroelectronics.X-CUBE-AZRTOS-H7_VS_NetworkJjNetXDuo_6.4.0_3.3.0
-VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_RTOSJjThreadX_6.4.0_3.3.0.Mode=RTOSJjThreadX
-VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_RTOSJjThreadX_6.4.0_3.3.0.Signal=STMicroelectronics.X-CUBE-AZRTOS-H7_VS_RTOSJjThreadX_6.4.0_3.3.0
 VP_SYS_VS_tim7.Mode=TIM7
 VP_SYS_VS_tim7.Signal=SYS_VS_tim7
