TIM3 и TIM8 поменяты местами

плюс по мелочи:
- полряность каналов
- симуляция тока для отладки без тока на АЦП
- регулируемый запас на максимальнйы угол
This commit is contained in:
2025-11-20 10:57:47 +03:00
parent 0e950148c5
commit 2b22c5b0eb
13 changed files with 132 additions and 97 deletions

View File

@@ -88,6 +88,7 @@ set code_PERIPH=.\MCU_STM32_Matlab\stm32_matlab_conf.c^
.\MCU_STM32_Matlab\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c^
.\MCU_STM32_Matlab\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c^
.\MCU_STM32_Matlab\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c^
.\MCU_STM32_Matlab\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_iwdg.c^
.\MCU_STM32_Matlab\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c^
.\MCU_STM32_Matlab\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c^
.\MCU_STM32_Matlab\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c^

View File

@@ -7,7 +7,7 @@
#include "app_wrapper.h"
float dbg[16];
extern float iref_dbg;
extern float dbg_iref;
#define PIN_READ(_verbname_) (_verbname_##_GPIO_Port->ODR & (_verbname_##_Pin)) ? 1 : 0
void Write_UPP_Outputs(real_T* Buffer, int ind_port)
@@ -115,7 +115,7 @@ void app_readInputs(const real_T* Buffer) {
ADC_Set_Channel_Value(ADC3, 8, ReadInputArray(0,4));
ADC_Set_Channel_Value(ADC3, 10, ReadInputArray(0,5));
iref_dbg = ReadInputArray(1, 0);
dbg_iref = ReadInputArray(1, 0);
upp.call->go = ReadInputArray(1, 1);
MB_INTERNAL.param.angle.Angle_Max = ReadInputArray(1, 2)*65535;