Changeset 65 for ctrl/firmware/Main/CubeMX
- Timestamp:
- Jan 21, 2025, 11:26:15 AM (4 days ago)
- Location:
- ctrl/firmware/Main/CubeMX
- Files:
-
- 8 added
- 4 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; -
ctrl/firmware/Main/CubeMX/charger.ioc
r64 r65 3 3 CAD.pinconfig= 4 4 CAD.provider= 5 CORTEX_M7.AccessPermission_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_REGION_FULL_ACCESS 6 CORTEX_M7.BaseAddress_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=0x30000000 5 7 CORTEX_M7.CPU_DCache=Enabled 6 8 CORTEX_M7.CPU_ICache=Enabled 7 CORTEX_M7.IPParameters=default_mode_Activation,CPU_ICache,CPU_DCache 9 CORTEX_M7.DisableExec_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_INSTRUCTION_ACCESS_DISABLE 10 CORTEX_M7.Enable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_REGION_ENABLE 11 CORTEX_M7.IPParameters=default_mode_Activation,CPU_ICache,CPU_DCache,Enable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,BaseAddress_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,Size_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,AccessPermission_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,DisableExec_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,IsShareable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S 12 CORTEX_M7.IsShareable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_ACCESS_SHAREABLE 13 CORTEX_M7.Size_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_REGION_SIZE_1KB 8 14 CORTEX_M7.default_mode_Activation=1 9 15 Dma.Request0=SPI4_TX … … 35 41 Dma.USART3_RX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE 36 42 Dma.USART3_RX.1.MemInc=DMA_MINC_ENABLE 37 Dma.USART3_RX.1.Mode=DMA_ CIRCULAR43 Dma.USART3_RX.1.Mode=DMA_NORMAL 38 44 Dma.USART3_RX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE 39 45 Dma.USART3_RX.1.PeriphInc=DMA_PINC_DISABLE
Note: See TracChangeset
for help on using the changeset viewer.