Changeset 22 for trunk/firmware_v2/Core


Ignore:
Timestamp:
Aug 19, 2025, 2:15:57 PM (8 days ago)
Author:
f.jahn
Message:

Fixing project before changing settings in CubeMX.

Location:
trunk/firmware_v2/Core/Src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/firmware_v2/Core/Src/stm32c0xx_it.c

    r21 r22  
    248248        if (htim->Instance == TIM3)
    249249        {
    250                 ic_overflows++;
    251                 //printf("Ovf\n");
    252                 //ic_overflows %=
     250                if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1OF))
     251                {
     252                        ic_overflows++;
     253                        //printf("Ovf\n");
     254                        //ic_overflows %=
     255                }
    253256        }
    254257}
  • trunk/firmware_v2/Core/Src/tim.c

    r21 r22  
    2424
    2525#define STATE_NUM       (2U)
    26 #define AVG_NUM         (64U)
     26#define AVG_NUM         (8U)
    2727
    2828uint16_t ic_buf[AVG_NUM][STATE_NUM];
     
    5252  /* USER CODE END TIM3_Init 1 */
    5353  htim3.Instance = TIM3;
    54   htim3.Init.Prescaler = 3;
     54  htim3.Init.Prescaler = 1;
    5555  htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
    5656  htim3.Init.Period = 65535;
     
    9494  /* USER CODE BEGIN TIM3_Init 2 */
    9595
     96  __HAL_TIM_ENABLE_IT(&htim3, TIM_IT_UPDATE);
    9697  HAL_TIM_IC_Start_DMA(&htim3, TIM_CHANNEL_1, (uint32_t*)ic_buf, STATE_NUM * AVG_NUM);
    9798
Note: See TracChangeset for help on using the changeset viewer.