base blink migrated, code generated (tasks added in MX). tuned

This commit is contained in:
Ivan I. Ovchinnikov
2026-07-23 21:53:22 +03:00
parent da13d43b0b
commit 2fe25879f3
8 changed files with 13 additions and 17 deletions
+2 -5
View File
@@ -63,7 +63,7 @@
#define configCPU_CLOCK_HZ ( SystemCoreClock )
#define configTICK_RATE_HZ ((TickType_t)1000)
#define configMAX_PRIORITIES ( 56 )
#define configMINIMAL_STACK_SIZE ((uint16_t)128)
#define configMINIMAL_STACK_SIZE ((uint16_t)256)
#define configTOTAL_HEAP_SIZE ((size_t)15360)
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 1
@@ -87,10 +87,7 @@
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY ( 2 )
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH 256
/* The following flag must be enabled only when using newlib */
#define configUSE_NEWLIB_REENTRANT 1
#define configTIMER_TASK_STACK_DEPTH 512
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
+1 -1
View File
@@ -52,6 +52,7 @@
/* #define HAL_SRAM_MODULE_ENABLED */
/* #define HAL_SDRAM_MODULE_ENABLED */
/* #define HAL_HASH_MODULE_ENABLED */
/* #define HAL_I2C_MODULE_ENABLED */
/* #define HAL_I2S_MODULE_ENABLED */
/* #define HAL_IWDG_MODULE_ENABLED */
/* #define HAL_LPTIM_MODULE_ENABLED */
@@ -84,7 +85,6 @@
#define HAL_RCC_MODULE_ENABLED
#define HAL_FLASH_MODULE_ENABLED
#define HAL_PWR_MODULE_ENABLED
#define HAL_I2C_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED
/* ########################## HSE/HSI Values adaptation ##################### */
+3 -3
View File
@@ -78,21 +78,21 @@ uint16_t rxIndex = 0; // Индекс в буфере приёма
osThreadId_t defaultTaskHandle;
const osThreadAttr_t defaultTask_attributes = {
.name = "defaultTask",
.stack_size = 128 * 4,
.stack_size = 256 * 4,
.priority = (osPriority_t) osPriorityNormal,
};
/* Definitions for myLed */
osThreadId_t myLedHandle;
const osThreadAttr_t myLed_attributes = {
.name = "myLed",
.stack_size = 128 * 4,
.stack_size = 256 * 4,
.priority = (osPriority_t) osPriorityNormal,
};
/* Definitions for myUART */
osThreadId_t myUARTHandle;
const osThreadAttr_t myUART_attributes = {
.name = "myUART",
.stack_size = 128 * 4,
.stack_size = 256 * 4,
.priority = (osPriority_t) osPriorityNormal,
};
+2 -5
View File
@@ -98,9 +98,7 @@ int main(void)
/* USER CODE END 2 */
/* Init scheduler */
osKernelInitialize();
/* Call init function for freertos objects (in cmsis_os2.c) */
osKernelInitialize(); /* Call init function for freertos objects (in cmsis_os2.c) */
MX_FREERTOS_Init();
/* Start scheduler */
@@ -245,8 +243,7 @@ void Error_Handler(void)
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
-1
View File
@@ -17,7 +17,6 @@
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* USER CODE BEGIN Includes */
+1
View File
@@ -78,6 +78,7 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
status = HAL_TIM_Base_Init(&htim1);
if (status == HAL_OK)
{
/* Start the TIM time Base generation in interrupt mode */
status = HAL_TIM_Base_Start_IT(&htim1);
if (status == HAL_OK)
+1
View File
@@ -140,3 +140,4 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */