Changeset 65 for ctrl/firmware/Main/CubeMX/Core
- Timestamp:
- Jan 21, 2025, 11:26:15 AM (5 days ago)
- Location:
- ctrl/firmware/Main/CubeMX/Core/Src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ctrl/firmware/Main/CubeMX/Core/Src/app_threadx.c
r64 r65 28 28 #include <stdio.h> 29 29 30 #include "tx_queue.h" 31 30 32 #include "keys_thread.h" 31 33 #include "gsm_thread.h" 34 #include "gsm_rx_thread.h" 32 35 33 36 /* USER CODE END Includes */ … … 41 44 /* USER CODE BEGIN PD */ 42 45 43 #define KEYS_THREAD_STACK_SIZE_BYTES (1024U) 44 #define GSM_THREAD_STACK_SIZE_BYTES (1024U) 46 #define KEYS_THREAD_STACK_SIZE_BYTES (1024U) 47 #define GSM_THREAD_STACK_SIZE_BYTES (1024U) 48 #define GSM_RX_THREAD_STACK_SIZE_BYTES (1024U) 45 49 46 50 /* USER CODE END PD */ … … 56 60 TX_THREAD scan_keys_thread_ptr; 57 61 TX_THREAD gsm_thread_ptr; 62 TX_THREAD gsm_rx_thread_ptr; 58 63 59 64 /* USER CODE END PV */ … … 77 82 VOID *keys_thread_pointer; 78 83 VOID *gsm_thread_pointer; 84 VOID *gsm_rx_thread_pointer; 79 85 80 86 /* USER CODE END App_ThreadX_MEM_POOL */ … … 98 104 ret = tx_thread_create(&gsm_thread_ptr, 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); 99 105 if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", gsm_thread_name); return ret; } 106 107 // Allocate the stack for gsm send thread 108 ret = tx_byte_allocate(byte_pool, &gsm_rx_thread_pointer, GSM_RX_THREAD_STACK_SIZE_BYTES, TX_NO_WAIT); 109 if (ret != TX_SUCCESS) { printf("Cannot allocate bytes of memory!\n"); return ret; } 110 111 char* gsm_rx_thread_name = "GSM RX Thread"; 112 ret = tx_thread_create(&gsm_rx_thread_ptr, 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); 113 if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", gsm_rx_thread_name); return ret; } 100 114 101 115 -
ctrl/firmware/Main/CubeMX/Core/Src/stm32h7xx_it.c
r64 r65 24 24 /* USER CODE BEGIN Includes */ 25 25 26 #include "gsm_ thread.h"26 #include "gsm_rx_thread.h" 27 27 28 28 /* USER CODE END Includes */ … … 273 273 void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size) 274 274 { 275 if (huart->Instance == USART3) gsm UnitSentData(Size);275 if (huart->Instance == USART3) gsmRxData(Size); 276 276 } 277 277 -
ctrl/firmware/Main/CubeMX/Core/Src/usart.c
r64 r65 130 130 hdma_usart3_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; 131 131 hdma_usart3_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; 132 hdma_usart3_rx.Init.Mode = DMA_ CIRCULAR;132 hdma_usart3_rx.Init.Mode = DMA_NORMAL; 133 133 hdma_usart3_rx.Init.Priority = DMA_PRIORITY_LOW; 134 134 hdma_usart3_rx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
Note: See TracChangeset
for help on using the changeset viewer.