запустилось... но симуляцию периферии надо переделывать, работает непойми как
This commit is contained in:
@@ -28,9 +28,12 @@ extern "C" {
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f1xx.h"
|
||||
#include "stm32_defs.h"
|
||||
#include "Legacy/stm32_hal_legacy.h"
|
||||
#include <stddef.h>
|
||||
//#include "mcu_wrapper_conf.h"
|
||||
#include "stm32f1xx_matlab_rcc.h"
|
||||
#include "stm32f1xx_matlab_gpio.h"
|
||||
#include "stm32f1xx_matlab_tim.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
#define _MATLAB_GPIO_H_
|
||||
|
||||
#include "simstruc.h"
|
||||
#include "mcu_wrapper_conf.h"
|
||||
#include "stm32f1xx_matlab_conf.h"
|
||||
//#include "mcu_wrapper_conf.h"
|
||||
|
||||
/* äåôàéíû äëÿ ïðîâåðêè êîíôèãóðàöèè GPIO) */
|
||||
#define GET_GPIO_CONF(_reg_, _pos_) ((_pos_ < 8)? \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _MATLAB_RCC_H_
|
||||
#define _MATLAB_RCC_H_
|
||||
|
||||
#include "mcu_wrapper_conf.h"
|
||||
#include "stm32f1xx_matlab_conf.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#define _MATLAB_TIM_H_
|
||||
|
||||
#include "stm32f1xx_it.h"
|
||||
#include "mcu_wrapper_conf.h"
|
||||
#include "stm32f1xx_matlab_conf.h"
|
||||
//#include "mcu_wrapper_conf.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ void Init_TIM_SIM(void)
|
||||
{
|
||||
#ifdef USE_TIM1
|
||||
tim1s.tx_cnt = TIM1->CNT;
|
||||
tim1s.tx_step = hmcu.SIM_Sample_Time * ABP2_TIMS_Value;
|
||||
tim1s.tx_step = hmcu.sSimSampleTime * ABP2_TIMS_Value;
|
||||
|
||||
tim1s.Channels.OC1_GPIOx = GPIOA;
|
||||
tim1s.Channels.OC1_PIN_SHIFT = 8;
|
||||
@@ -99,7 +99,7 @@ void Init_TIM_SIM(void)
|
||||
#endif
|
||||
#ifdef USE_TIM2
|
||||
tim2s.tx_cnt = TIM2->CNT;
|
||||
tim2s.tx_step = hmcu.SIM_Sample_Time * ABP1_TIMS_Value;
|
||||
tim2s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
tim2s.Channels.OC1_GPIOx = GPIOA;
|
||||
tim2s.Channels.OC1_PIN_SHIFT = 5;
|
||||
@@ -112,7 +112,7 @@ void Init_TIM_SIM(void)
|
||||
#endif
|
||||
#ifdef USE_TIM3
|
||||
tim3s.tx_cnt = TIM3->CNT;
|
||||
tim3s.tx_step = hmcu.SIM_Sample_Time * ABP1_TIMS_Value;
|
||||
tim3s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
tim3s.Channels.OC1_GPIOx = GPIOB;
|
||||
tim3s.Channels.OC1_PIN_SHIFT = 4;
|
||||
@@ -125,7 +125,7 @@ void Init_TIM_SIM(void)
|
||||
#endif
|
||||
#ifdef USE_TIM4
|
||||
tim4s.tx_cnt = TIM4->CNT;
|
||||
tim4s.tx_step = hmcu.SIM_Sample_Time * ABP1_TIMS_Value;
|
||||
tim4s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
tim4s.Channels.OC1_GPIOx = GPIOD;
|
||||
tim4s.Channels.OC1_PIN_SHIFT = 12;
|
||||
@@ -138,7 +138,7 @@ void Init_TIM_SIM(void)
|
||||
#endif
|
||||
#ifdef USE_TIM5
|
||||
tim5s.tx_cnt = TIM5->CNT;
|
||||
tim5s.tx_step = hmcu.SIM_Sample_Time * ABP1_TIMS_Value;
|
||||
tim5s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
tim5s.Channels.OC1_GPIOx = GPIOA;
|
||||
tim5s.Channels.OC1_PIN_SHIFT = 0;
|
||||
@@ -151,7 +151,7 @@ void Init_TIM_SIM(void)
|
||||
#endif
|
||||
#ifdef USE_TIMx
|
||||
tim6s.tx_cnt = TIMx->CNT;
|
||||
tim6s.tx_step = hmcu.SIM_Sample_Time * ABP1_TIMS_Value;
|
||||
tim6s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
tim6s.Channels.OC1_GPIOx = GPIOA;
|
||||
tim6s.Channels.OC1_PIN_SHIFT = 0;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#define _MATLAB_SETUP_H_
|
||||
#include "stm32_defs.h"
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "mcu_wrapper_conf.h"
|
||||
|
||||
// DEFINES (UNCOMMENT WHAT YOU WILL SIMULATE)
|
||||
// TIMS
|
||||
|
||||
Reference in New Issue
Block a user