diff --git a/MCU_STM32F4xx_Matlab/STM32F4xx_SIMULINK/stm32f4xx_matlab_gpio.c b/MCU_STM32F4xx_Matlab/STM32F4xx_SIMULINK/stm32f4xx_matlab_gpio.c index b16ea6a..7bc3f37 100644 --- a/MCU_STM32F4xx_Matlab/STM32F4xx_SIMULINK/stm32f4xx_matlab_gpio.c +++ b/MCU_STM32F4xx_Matlab/STM32F4xx_SIMULINK/stm32f4xx_matlab_gpio.c @@ -8,6 +8,7 @@ **************************************************************************/ #include "stm32f4xx_matlab_gpio.h" #include "modbus.h" +#include "pwm.h" /** * @brief Запись буфера выходов S-Function из GPIO. @@ -79,4 +80,6 @@ void SFUNC_to_GPIO(real_T* in) { MB_Reset_Coil_Local(coils_regs, COIL_PWM_PHASE_MODE); } + hpwm.PWM_Sine_Hz = in[i++]; + } \ No newline at end of file diff --git a/MCU_Wrapper/mcu_wrapper_conf.h b/MCU_Wrapper/mcu_wrapper_conf.h index 2ccca66..35e49c0 100644 --- a/MCU_Wrapper/mcu_wrapper_conf.h +++ b/MCU_Wrapper/mcu_wrapper_conf.h @@ -53,7 +53,7 @@ #define PORT_NUMB 3 ///< amount of ports // Parameters of S_Function #define NPARAMS 1 ///< number of input parametrs (only Ts) -#define IN_PORT_WIDTH (9) ///< width of input ports +#define IN_PORT_WIDTH (10) ///< width of input ports #define IN_PORT_NUMB 1 ///< number of input ports #define OUT_PORT_WIDTH PORT_WIDTH ///< width of output ports #define OUT_PORT_NUMB PORT_NUMB ///< number of output ports diff --git a/mcu_test_r2021a.slx b/mcu_test_r2021a.slx index 6cad6c0..3b12ddd 100644 Binary files a/mcu_test_r2021a.slx and b/mcu_test_r2021a.slx differ