Ignore:
Timestamp:
Jan 23, 2025, 4:10:33 PM (4 months ago)
Author:
Zed
Message:

NetX can be compiled and initialized.

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  
    88#include "utils.h"
    99
    10 static constexpr unsigned INPUT_BUF_SIZE = 64U;  // Must be dev by 4
     10static constexpr unsigned INPUT_BUF_SIZE = 512U;  // Must be dev by 4
    1111static constexpr ULONG ONE_SHOT_TIMER = 0U;
    1212static constexpr ULONG TIMER_PERIOD_MS = 20U;
    1313
    14 alignas(32) static unsigned ibuf[INPUT_BUF_SIZE]                                                                __attribute__((section(".RAM1")));
     14alignas(32) static unsigned ibuf[INPUT_BUF_SIZE]                                                                __attribute__((section(".DTCM_RAM")));
    1515//alignas(32) static char obuf[INPUT_BUF_SIZE]                                                                  __attribute__((section(".RAM1")));
    1616
     
    1919//TX_EVENT_FLAGS_GROUP fanEG;
    2020static TX_TIMER timer;
     21static char timer_name[] = "IC overflow timer";
     22
    2123
    2224//------------------------------------------------------------------------------
     
    3032        (void)initial_input;
    3133        //extern DMA_HandleTypeDef hdma_tim8_ch1;
    32         extern TX_THREAD fan_thread_ptr;
     34        extern TX_THREAD fan_thread;
    3335
    3436        // Compute the value of ARR register to generate signal frequency at 25Khz
     
    4749        //ULONG actual_flags;
    4850
    49         char timer_name[] = "IC overflow timer";
    5051        tx_timer_create(&timer, timer_name, icTimeout, 0, TIMER_PERIOD_MS, ONE_SHOT_TIMER, TX_NO_ACTIVATE);
    5152
     
    5960                        //__HAL_DMA_DISABLE_IT(&hdma_tim8_ch1, DMA_IT_HT);
    6061
    61                         tx_thread_suspend(&fan_thread_ptr);
     62                        tx_thread_suspend(&fan_thread);
    6263                        //tx_event_flags_get(&fanEG, 1, TX_AND_CLEAR, &actual_flags, TX_WAIT_FOREVER);
    6364
     
    113114void pulseMeasured(void)
    114115{
    115         extern TX_THREAD fan_thread_ptr;
     116        extern TX_THREAD fan_thread;
    116117        //static uint32_t lastTime;
    117118        /*extern DMA_HandleTypeDef hdma_tim3_ch1;
     
    137138        //printf("%u\n", HAL_GetTick());
    138139
    139         tx_thread_resume(&fan_thread_ptr);
     140        tx_thread_resume(&fan_thread);
    140141}
    141142
     
    144145static VOID icTimeout(ULONG)
    145146{
    146         extern TX_THREAD fan_thread_ptr;
     147        extern TX_THREAD fan_thread;
    147148        rawCnt = 0;
    148149        HAL_TIM_IC_Stop_IT(&htim8, TIM_CHANNEL_1);
    149         tx_thread_resume(&fan_thread_ptr);
     150        tx_thread_resume(&fan_thread);
    150151}
Note: See TracChangeset for help on using the changeset viewer.