mc_tasks.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. ******************************************************************************
  3. * @file mc_tasks.h
  4. * @author Motor Control SDK Team, ST Microelectronics
  5. * @brief This file implementes tasks definition.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under Ultimate Liberty license
  13. * SLA0044, the "License"; You may not use this file except in compliance with
  14. * the License. You may obtain a copy of the License at:
  15. * www.st.com/SLA0044
  16. *
  17. ******************************************************************************
  18. * @ingroup MCTasks
  19. */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef __MCTASKS_H
  22. #define __MCTASKS_H
  23. /* Includes ------------------------------------------------------------------*/
  24. #include "mc_tuning.h"
  25. #include "mc_interface.h"
  26. /** @addtogroup MCSDK
  27. * @{
  28. */
  29. /** @defgroup MCTasks Motor Control Tasks
  30. *
  31. * @brief Motor Control subsystem configuration and operation routines.
  32. *
  33. * @{
  34. */
  35. /* Initializes the Motor subsystem core according to user defined parameters. */
  36. void MCboot( MCI_Handle_t* pMCIList[], MCT_Handle_t* pMCTList[] );
  37. /* Runs all the Tasks of the Motor Control cockpit */
  38. void MC_RunMotorControlTasks(void);
  39. /* Executes the Medium Frequency Task functions for each drive instance */
  40. void MC_Scheduler(void);
  41. /* Executes safety checks (e.g. bus voltage and temperature) for all drive instances */
  42. void TSK_SafetyTask(void);
  43. /* Executes the Motor Control duties that require a high frequency rate and a precise timing */
  44. uint8_t TSK_HighFrequencyTask(void);
  45. /* Reserves FOC execution on ADC ISR half a PWM period in advance */
  46. void TSK_DualDriveFIFOUpdate(uint8_t Motor);
  47. /* Puts the Motor Control subsystem in in safety conditions on a Hard Fault */
  48. void TSK_HardwareFaultTask(void);
  49. /* Locks GPIO pins used for Motor Control to prevent accidental reconfiguration */
  50. void mc_lock_pins (void);
  51. /**
  52. * @}
  53. */
  54. /**
  55. * @}
  56. */
  57. #endif /* __MCTASKS_H */
  58. /******************* (C) COPYRIGHT 2019 STMicroelectronics *****END OF FILE****/