update
parent
0cbd186dc1
commit
654f9b1b3e
|
@ -39,10 +39,10 @@
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.883307296" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.883307296" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1182522958" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.og" valueType="enumerated"/>
|
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1182522958" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.og" valueType="enumerated"/>
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1676188920" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1676188920" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="DEPLOY_MODE="DEBUG""/>
|
||||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||||
<listOptionValue builtIn="false" value="STM32F107xC"/>
|
<listOptionValue builtIn="false" value="STM32F107xC"/>
|
||||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||||
<listOptionValue builtIn="false" value="DEPLOY_MODE="DEBUG""/>
|
|
||||||
<listOptionValue builtIn="false" value="APP_VERSION="V0.9.1""/>
|
<listOptionValue builtIn="false" value="APP_VERSION="V0.9.1""/>
|
||||||
</option>
|
</option>
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.186388616" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.186388616" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
||||||
|
@ -98,8 +98,8 @@
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="CMSIS"/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="CMSIS"/>
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="USB_DEVICE"/>
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="USB_DEVICE"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -143,8 +143,8 @@
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1412817126" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1412817126" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||||
<listOptionValue builtIn="false" value="STM32F107xC"/>
|
<listOptionValue builtIn="false" value="STM32F107xC"/>
|
||||||
<listOptionValue builtIn="false" value="DEPLOY_MODE="RELEASE""/>
|
|
||||||
<listOptionValue builtIn="false" value="APP_VERSION="V0.9.1""/>
|
<listOptionValue builtIn="false" value="APP_VERSION="V0.9.1""/>
|
||||||
|
<listOptionValue builtIn="false" value="DEPLOY_MODE="RELEASE""/>
|
||||||
</option>
|
</option>
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.968919675" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.968919675" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
||||||
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
|
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Description:
|
* @Description:
|
||||||
* @Date: 2020-04-02 21:44:31
|
* @Date: 2020-04-02 21:44:31
|
||||||
* @LastEditors: CK.Zh
|
* @LastEditors: CK.Zh
|
||||||
* @LastEditTime: 2020-12-17 17:27:06
|
* @LastEditTime: 2020-12-17 18:39:26
|
||||||
* @FilePath: \NaviKit_stm32\Core\Src\freertos.c
|
* @FilePath: \NaviKit_stm32\Core\Src\freertos.c
|
||||||
*/
|
*/
|
||||||
/* USER CODE BEGIN Header */
|
/* USER CODE BEGIN Header */
|
||||||
|
@ -112,11 +112,6 @@ const osThreadAttr_t PowerMonitTask_attributes = {
|
||||||
.priority = (osPriority_t) osPriorityLow,
|
.priority = (osPriority_t) osPriorityLow,
|
||||||
.stack_size = 128 * 4
|
.stack_size = 128 * 4
|
||||||
};
|
};
|
||||||
/* Definitions for myMutex01 */
|
|
||||||
osMutexId_t myMutex01Handle;
|
|
||||||
const osMutexAttr_t myMutex01_attributes = {
|
|
||||||
.name = "myMutex01"
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
/* USER CODE BEGIN FunctionPrototypes */
|
/* USER CODE BEGIN FunctionPrototypes */
|
||||||
|
@ -197,9 +192,6 @@ void MX_FREERTOS_Init(void) {
|
||||||
/* USER CODE BEGIN Init */
|
/* USER CODE BEGIN Init */
|
||||||
|
|
||||||
/* USER CODE END Init */
|
/* USER CODE END Init */
|
||||||
/* Create the mutex(es) */
|
|
||||||
/* creation of myMutex01 */
|
|
||||||
myMutex01Handle = osMutexNew(&myMutex01_attributes);
|
|
||||||
|
|
||||||
/* USER CODE BEGIN RTOS_MUTEX */
|
/* USER CODE BEGIN RTOS_MUTEX */
|
||||||
/* add mutexes, ... */
|
/* add mutexes, ... */
|
||||||
|
@ -278,7 +270,7 @@ void StartDefaultTask(void *argument)
|
||||||
Log(info,"Device ID: %u ", HAL_GetDEVID());
|
Log(info,"Device ID: %u ", HAL_GetDEVID());
|
||||||
Log(info,"Chip UID: %u%u%u ", HAL_GetUIDw0(),HAL_GetUIDw1(),HAL_GetUIDw2);
|
Log(info,"Chip UID: %u%u%u ", HAL_GetUIDw0(),HAL_GetUIDw1(),HAL_GetUIDw2);
|
||||||
|
|
||||||
if(osKernelGetInfo(&osVersion,id_buf,id_size)){
|
if(osOK == osKernelGetInfo(&osVersion,id_buf,id_size)){
|
||||||
Log(info,"OS Kernel Version: %u ", osVersion.kernel );
|
Log(info,"OS Kernel Version: %u ", osVersion.kernel );
|
||||||
Log(info,"OS Kernel ID: %s ",id_buf );
|
Log(info,"OS Kernel ID: %s ",id_buf );
|
||||||
}
|
}
|
||||||
|
@ -586,24 +578,19 @@ void StartPowerMonitTask(void *argument)
|
||||||
{
|
{
|
||||||
if(NaviKit.pmb.rails.out_24v > 26.4 || NaviKit.pmb.rails.out_24v < 21.6){
|
if(NaviKit.pmb.rails.out_24v > 26.4 || NaviKit.pmb.rails.out_24v < 21.6){
|
||||||
Log(error,"24V power rail exception:%f",NaviKit.pmb.rails.out_24v);
|
Log(error,"24V power rail exception:%f",NaviKit.pmb.rails.out_24v);
|
||||||
// printf("24V power rail exception:%f",NaviKit.pmb.rails.out_24v);
|
|
||||||
}
|
}
|
||||||
if(NaviKit.pmb.rails.out_5v > 5.5 || NaviKit.pmb.rails.out_5v < 4.5){
|
if(NaviKit.pmb.rails.out_5v > 5.5 || NaviKit.pmb.rails.out_5v < 4.5){
|
||||||
Log(error,"5V power rail exception:%f",NaviKit.pmb.rails.out_5v);
|
Log(error,"5V power rail exception:%f",NaviKit.pmb.rails.out_5v);
|
||||||
// printf("5V power rail exception:%f",NaviKit.pmb.rails.out_5v);
|
|
||||||
}
|
}
|
||||||
if(NaviKit.pmb.rails.out_12v > 13.2 || NaviKit.pmb.rails.out_12v < 10.8){
|
if(NaviKit.pmb.rails.out_12v > 13.2 || NaviKit.pmb.rails.out_12v < 10.8){
|
||||||
Log(error ,"12V power rail exception:%f",NaviKit.pmb.rails.out_12v);
|
Log(error ,"12V power rail exception:%f",NaviKit.pmb.rails.out_12v);
|
||||||
// printf("12V power rail exception:%f",NaviKit.pmb.rails.out_12v);
|
|
||||||
}
|
}
|
||||||
if(NaviKit.pmb.rails.bkp_bat < 10){
|
if(NaviKit.pmb.rails.bkp_bat < 10){
|
||||||
Log(warning,"Backup power is not online");
|
Log(warning,"Backup power is not online");
|
||||||
// printf("Backup power is not online");
|
|
||||||
}
|
}
|
||||||
if(NaviKit.pmb.rails.main_pwr < 19){
|
if(NaviKit.pmb.rails.main_pwr < 19){
|
||||||
Beep(100);
|
Beep(100);
|
||||||
Log(warning,"Main power has been lost, please shutdown computer as soon as possible");
|
Log(warning,"Main power has been lost, please shutdown computer as soon as possible");
|
||||||
// printf("Main power has been lost, please shutdown computer as soon as possible");
|
|
||||||
}
|
}
|
||||||
osDelay(5000);
|
osDelay(5000);
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
/*
|
|
||||||
* @Description:
|
|
||||||
* @Date: 2020-04-04 11:28:36
|
|
||||||
* @LastEditors: CK.Zh
|
|
||||||
* @LastEditTime: 2020-12-17 17:28:53
|
|
||||||
* @FilePath: \NaviKit_stm32\Core\Src\usart.c
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file usart.c
|
* @file usart.c
|
||||||
|
|
|
@ -69,8 +69,7 @@ FREERTOS.FootprintOK=true
|
||||||
FREERTOS.HEAP_NUMBER=4
|
FREERTOS.HEAP_NUMBER=4
|
||||||
FREERTOS.INCLUDE_xTaskGetCurrentTaskHandle=1
|
FREERTOS.INCLUDE_xTaskGetCurrentTaskHandle=1
|
||||||
FREERTOS.INCLUDE_xTaskGetHandle=1
|
FREERTOS.INCLUDE_xTaskGetHandle=1
|
||||||
FREERTOS.IPParameters=Tasks01,configMAX_TASK_NAME_LEN,configUSE_TICKLESS_IDLE,INCLUDE_xTaskGetCurrentTaskHandle,INCLUDE_xTaskGetHandle,configUSE_APPLICATION_TASK_TAG,FootprintOK,configUSE_IDLE_HOOK,configUSE_TICK_HOOK,configUSE_MALLOC_FAILED_HOOK,configGENERATE_RUN_TIME_STATS,configUSE_STATS_FORMATTING_FUNCTIONS,configUSE_TRACE_FACILITY,HEAP_NUMBER,configTOTAL_HEAP_SIZE,configCHECK_FOR_STACK_OVERFLOW,configUSE_TASK_NOTIFICATIONS,Mutexes01
|
FREERTOS.IPParameters=Tasks01,configMAX_TASK_NAME_LEN,configUSE_TICKLESS_IDLE,INCLUDE_xTaskGetCurrentTaskHandle,INCLUDE_xTaskGetHandle,configUSE_APPLICATION_TASK_TAG,FootprintOK,configUSE_IDLE_HOOK,configUSE_TICK_HOOK,configUSE_MALLOC_FAILED_HOOK,configGENERATE_RUN_TIME_STATS,configUSE_STATS_FORMATTING_FUNCTIONS,configUSE_TRACE_FACILITY,HEAP_NUMBER,configTOTAL_HEAP_SIZE,configCHECK_FOR_STACK_OVERFLOW,configUSE_TASK_NOTIFICATIONS
|
||||||
FREERTOS.Mutexes01=myMutex01,Dynamic,NULL
|
|
||||||
FREERTOS.Tasks01=defaultTask,24,128,StartDefaultTask,Default,NULL,Dynamic,NULL,NULL;LedBlinkTask,8,128,StartLedBlinkTask,Default,NULL,Dynamic,NULL,NULL;IWDGRefreshTask,40,128,StartIWDGRefreshTask,Default,NULL,Dynamic,NULL,NULL;EventDetect,8,128,StartEventDetect,Default,NULL,Dynamic,NULL,NULL;CoulombRead,8,128,StartCoulombRead,Default,NULL,Dynamic,NULL,NULL;StateSwitchTask,8,128,StartStateSwitchTask,Default,NULL,Dynamic,NULL,NULL;PowerMonitTask,8,128,StartPowerMonitTask,Default,NULL,Dynamic,NULL,NULL
|
FREERTOS.Tasks01=defaultTask,24,128,StartDefaultTask,Default,NULL,Dynamic,NULL,NULL;LedBlinkTask,8,128,StartLedBlinkTask,Default,NULL,Dynamic,NULL,NULL;IWDGRefreshTask,40,128,StartIWDGRefreshTask,Default,NULL,Dynamic,NULL,NULL;EventDetect,8,128,StartEventDetect,Default,NULL,Dynamic,NULL,NULL;CoulombRead,8,128,StartCoulombRead,Default,NULL,Dynamic,NULL,NULL;StateSwitchTask,8,128,StartStateSwitchTask,Default,NULL,Dynamic,NULL,NULL;PowerMonitTask,8,128,StartPowerMonitTask,Default,NULL,Dynamic,NULL,NULL
|
||||||
FREERTOS.configCHECK_FOR_STACK_OVERFLOW=1
|
FREERTOS.configCHECK_FOR_STACK_OVERFLOW=1
|
||||||
FREERTOS.configGENERATE_RUN_TIME_STATS=1
|
FREERTOS.configGENERATE_RUN_TIME_STATS=1
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
/*
|
|
||||||
* @Description:
|
|
||||||
* @Date: 2020-02-20 11:58:24
|
|
||||||
* @LastEditors: CK.Zh
|
|
||||||
* @LastEditTime: 2020-12-17 17:39:37
|
|
||||||
* @FilePath: \NaviKit_stm32\USB_DEVICE\Target\usbd_conf.h
|
|
||||||
*/
|
|
||||||
/* USER CODE BEGIN Header */
|
/* USER CODE BEGIN Header */
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue