Changeset 69 for ctrl/firmware/Main/CubeMX
- Timestamp:
- Jan 23, 2025, 4:10:33 PM (4 days ago)
- Location:
- ctrl/firmware/Main/CubeMX
- Files:
-
- 73 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ctrl/firmware/Main/CubeMX/AZURE_RTOS/App/app_azure_rtos.c
r54 r69 62 62 static TX_BYTE_POOL fx_app_byte_pool; 63 63 64 /* USER CODE BEGIN NX_Pool_Buffer */ 65 /* USER CODE END NX_Pool_Buffer */ 66 #if defined ( __ICCARM__ ) 67 #pragma data_alignment=4 68 #endif 69 __ALIGN_BEGIN static UCHAR nx_byte_pool_buffer[NX_APP_MEM_POOL_SIZE] __ALIGN_END; 70 static TX_BYTE_POOL nx_app_byte_pool; 71 64 72 #endif 65 73 … … 142 150 143 151 /* USER CODE END MX_FileX_Init_Success */ 152 } 153 154 if (tx_byte_pool_create(&nx_app_byte_pool, "Nx App memory pool", nx_byte_pool_buffer, NX_APP_MEM_POOL_SIZE) != TX_SUCCESS) 155 { 156 /* USER CODE BEGIN NX_Byte_Pool_Error */ 157 158 /* USER CODE END NX_Byte_Pool_Error */ 159 } 160 else 161 { 162 /* USER CODE BEGIN NX_Byte_Pool_Success */ 163 164 /* USER CODE END NX_Byte_Pool_Success */ 165 166 memory_ptr = (VOID *)&nx_app_byte_pool; 167 status = MX_NetXDuo_Init(memory_ptr); 168 if (status != NX_SUCCESS) 169 { 170 /* USER CODE BEGIN MX_NetXDuo_Init_Error */ 171 while(1) 172 { 173 } 174 /* USER CODE END MX_NetXDuo_Init_Error */ 175 } 176 177 /* USER CODE BEGIN MX_NetXDuo_Init_Success */ 178 179 /* USER CODE END MX_NetXDuo_Init_Success */ 180 144 181 } 145 182 -
ctrl/firmware/Main/CubeMX/AZURE_RTOS/App/app_azure_rtos.h
r57 r69 32 32 33 33 #include "app_filex.h" 34 35 #include "app_netxduo.h" 34 36 /* Private includes ----------------------------------------------------------*/ 35 37 /* USER CODE BEGIN Includes */ -
ctrl/firmware/Main/CubeMX/AZURE_RTOS/App/app_azure_rtos_config.h
r57 r69 48 48 #define FX_APP_MEM_POOL_SIZE 8192 49 49 50 #define NX_APP_MEM_POOL_SIZE 12288 51 50 52 /* USER CODE BEGIN EC */ 51 53 -
ctrl/firmware/Main/CubeMX/Core/Src/app_threadx.c
r66 r69 34 34 #include "gsm_rx_thread.h" 35 35 #include "fan_thread.h" 36 #include "eth_thread.h" 36 37 37 38 /* USER CODE END Includes */ … … 49 50 #define GSM_RX_THREAD_STACK_SIZE_BYTES (1024U) 50 51 #define FAN_THREAD_STACK_SIZE_BYTES (512U) 52 #define ETH_THREAD_STACK_SIZE_BYTES (2048U) 51 53 52 54 /* USER CODE END PD */ … … 60 62 /* USER CODE BEGIN PV */ 61 63 62 TX_THREAD scan_keys_thread_ptr; 63 TX_THREAD gsm_thread_ptr; 64 TX_THREAD gsm_rx_thread_ptr; 65 TX_THREAD fan_thread_ptr; 64 TX_THREAD scan_keys_thread; 65 TX_THREAD gsm_thread; 66 TX_THREAD gsm_rx_thread; 67 TX_THREAD fan_thread; 68 TX_THREAD eth_thread; 66 69 67 70 /* USER CODE END PV */ … … 87 90 VOID *gsm_rx_thread_pointer; 88 91 VOID *fan_thread_pointer; 92 VOID *eth_thread_pointer; 89 93 90 94 /* USER CODE END App_ThreadX_MEM_POOL */ … … 97 101 98 102 char* scan_keys_thread_name = "Scan Keys Thread"; 99 ret = tx_thread_create(&scan_keys_thread _ptr, 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);103 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); 100 104 if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", scan_keys_thread_name); return ret; } 101 105 … … 106 110 107 111 char* gsm_thread_name = "GSM Thread"; 108 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);112 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); 109 113 if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", gsm_thread_name); return ret; } 110 114 … … 114 118 115 119 char* gsm_rx_thread_name = "GSM RX Thread"; 116 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);120 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); 117 121 if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", gsm_rx_thread_name); return ret; } 118 122 … … 122 126 123 127 char* fan_thread_name = "FAN Thread"; 124 ret = tx_thread_create(&fan_thread_ptr, 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); 128 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); 129 if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", fan_thread_name); return ret; } 130 131 // Allocate the stack for ethernet thread 132 ret = tx_byte_allocate(byte_pool, ð_thread_pointer, ETH_THREAD_STACK_SIZE_BYTES, TX_NO_WAIT); 133 if (ret != TX_SUCCESS) { printf("Cannot allocate bytes of memory!\n"); return ret; } 134 135 char* eth_thread_name = "ETH Thread"; 136 ret = tx_thread_create(ð_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); 125 137 if (ret != TX_SUCCESS) { printf("Cannot create %s!\n", fan_thread_name); return ret; } 126 138 -
ctrl/firmware/Main/CubeMX/charger.ioc
r66 r69 131 131 Mcu.Pin45=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjFileX_6.4.0_3.3.0 132 132 Mcu.Pin46=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjInterfaces_3.3.0_3.3.0 133 Mcu.Pin47=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_NetworkJjNetXDuo_6.4.0_3.3.0 133 134 Mcu.Pin5=PF15 134 135 Mcu.Pin6=PG0 … … 136 137 Mcu.Pin8=PE7 137 138 Mcu.Pin9=PE11 138 Mcu.PinsNb=4 7139 Mcu.PinsNb=48 139 140 Mcu.ThirdParty0=STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0 140 141 Mcu.ThirdPartyNb=1 … … 435 436 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FileOoSystemJjInterfaces_Checked=true 436 437 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FileXCcFileOoSystemJjFileXJjCore=true 437 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 438 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 438 439 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.InterfacesCcFileOoSystemJjFileXOoSDOointerface=true 440 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.NetXDuoCcNetworkJjNetXDuoJjNXOoCore=true 441 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.NetworkJjInterfaces_Checked=false 442 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.NetworkJjNetXDuo_Checked=true 439 443 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.RTOSJjThreadX_Checked=true 440 444 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.TX_APP_CREATION=0 … … 451 455 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport=true 452 456 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_IsAnAzureRtosMw=true 453 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_SwParameter=InterfacesCcFileOoSystemJjFileXOoSDOointerface\:true;ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport\:true; FileXCcFileOoSystemJjFileXJjCore\:true;ThreadXCcRTOSJjThreadXJjCore\:true;457 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_SwParameter=InterfacesCcFileOoSystemJjFileXOoSDOointerface\:true;ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport\:true;NetXDuoCcNetworkJjNetXDuoJjNXOoCore\:true;InterfacesCcNetworkJjCustomOoInterface\:true;FileXCcFileOoSystemJjFileXJjCore\:true;ThreadXCcRTOSJjThreadXJjCore\:true; 454 458 TIM3.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_ENABLE 455 459 TIM3.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 … … 477 481 VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjInterfaces_3.3.0_3.3.0.Mode=FileOoSystemJjInterfaces 478 482 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 483 VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_NetworkJjNetXDuo_6.4.0_3.3.0.Mode=NetworkJjNetXDuo 484 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 479 485 VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_RTOSJjThreadX_6.4.0_3.3.0.Mode=RTOSJjThreadX 480 486 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
Note: See TracChangeset
for help on using the changeset viewer.