Changeset 69 for ctrl/firmware/Main/SES/Core
- Timestamp:
- Jan 23, 2025, 4:10:33 PM (4 months ago)
- Location:
- ctrl/firmware/Main/SES/Core
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ctrl/firmware/Main/SES/Core/Src/fan_thread.cpp
r68 r69 8 8 #include "utils.h" 9 9 10 static constexpr unsigned INPUT_BUF_SIZE = 64U; // Must be dev by 410 static constexpr unsigned INPUT_BUF_SIZE = 512U; // Must be dev by 4 11 11 static constexpr ULONG ONE_SHOT_TIMER = 0U; 12 12 static constexpr ULONG TIMER_PERIOD_MS = 20U; 13 13 14 alignas(32) static unsigned ibuf[INPUT_BUF_SIZE] __attribute__((section(". RAM1")));14 alignas(32) static unsigned ibuf[INPUT_BUF_SIZE] __attribute__((section(".DTCM_RAM"))); 15 15 //alignas(32) static char obuf[INPUT_BUF_SIZE] __attribute__((section(".RAM1"))); 16 16 … … 19 19 //TX_EVENT_FLAGS_GROUP fanEG; 20 20 static TX_TIMER timer; 21 static char timer_name[] = "IC overflow timer"; 22 21 23 22 24 //------------------------------------------------------------------------------ … … 30 32 (void)initial_input; 31 33 //extern DMA_HandleTypeDef hdma_tim8_ch1; 32 extern TX_THREAD fan_thread _ptr;34 extern TX_THREAD fan_thread; 33 35 34 36 // Compute the value of ARR register to generate signal frequency at 25Khz … … 47 49 //ULONG actual_flags; 48 50 49 char timer_name[] = "IC overflow timer";50 51 tx_timer_create(&timer, timer_name, icTimeout, 0, TIMER_PERIOD_MS, ONE_SHOT_TIMER, TX_NO_ACTIVATE); 51 52 … … 59 60 //__HAL_DMA_DISABLE_IT(&hdma_tim8_ch1, DMA_IT_HT); 60 61 61 tx_thread_suspend(&fan_thread _ptr);62 tx_thread_suspend(&fan_thread); 62 63 //tx_event_flags_get(&fanEG, 1, TX_AND_CLEAR, &actual_flags, TX_WAIT_FOREVER); 63 64 … … 113 114 void pulseMeasured(void) 114 115 { 115 extern TX_THREAD fan_thread _ptr;116 extern TX_THREAD fan_thread; 116 117 //static uint32_t lastTime; 117 118 /*extern DMA_HandleTypeDef hdma_tim3_ch1; … … 137 138 //printf("%u\n", HAL_GetTick()); 138 139 139 tx_thread_resume(&fan_thread _ptr);140 tx_thread_resume(&fan_thread); 140 141 } 141 142 … … 144 145 static VOID icTimeout(ULONG) 145 146 { 146 extern TX_THREAD fan_thread _ptr;147 extern TX_THREAD fan_thread; 147 148 rawCnt = 0; 148 149 HAL_TIM_IC_Stop_IT(&htim8, TIM_CHANNEL_1); 149 tx_thread_resume(&fan_thread _ptr);150 tx_thread_resume(&fan_thread); 150 151 }
Note: See TracChangeset
for help on using the changeset viewer.