parameters_conversion_f10x.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. ******************************************************************************
  3. * @file parameters_conversion_f10x.h
  4. * @author Motor Control SDK Team, ST Microelectronics
  5. * @brief This file contains the definitions needed to convert MC SDK parameters
  6. * so as to target the STM32F1 Family.
  7. *
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
  12. * All rights reserved.</center></h2>
  13. *
  14. * This software component is licensed by ST under Ultimate Liberty license
  15. * SLA0044, the "License"; You may not use this file except in compliance with
  16. * the License. You may obtain a copy of the License at:
  17. * www.st.com/SLA0044
  18. *
  19. ******************************************************************************
  20. */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __PARAMETERS_CONVERSION_F10X_H
  23. #define __PARAMETERS_CONVERSION_F10X_H
  24. #include "pmsm_motor_parameters.h"
  25. #include "drive_parameters.h"
  26. #include "power_stage_parameters.h"
  27. #include "mc_math.h"
  28. #define SYSCLK_FREQ 72000000uL
  29. #define TIM_CLOCK_DIVIDER 1
  30. #define ADV_TIM_CLK_MHz 72
  31. #define ADC_CLK_MHz 12
  32. #define HALL_TIM_CLK 72000000uL
  33. #define ADC1_2 ADC1
  34. /************************* IRQ Handler Mapping *********************/
  35. #define TIMx_UP_M1_IRQHandler TIM1_UP_IRQHandler
  36. #define DMAx_R1_M1_IRQHandler DMA1_Channel4_IRQHandler
  37. #define TIMx_BRK_M1_IRQHandler TIM1_BRK_IRQHandler
  38. /******************* ADC Physical characteristics ************/
  39. #define ADC_TRIG_CONV_LATENCY_CYCLES 3
  40. #define ADC_SAR_CYCLES 13
  41. #define M1_VBUS_SW_FILTER_BW_FACTOR 10u
  42. #endif /*__PARAMETERS_CONVERSION_F10X_H*/
  43. /******************* (C) COPYRIGHT 2019 STMicroelectronics *****END OF FILE****/