X-CUBE-SPN1-20150128 example source code for one motor compiled under mbed. Tested OK on Nucleo F401. l6474.cpp is modified from original with defines in l6474_target_config.h to select the original behaviour (motor de-energised when halted), or new mode to continue powering with a (reduced) current in the coils (braking/position hold capability). On F401 avoid using mbed's InterruptIn on pins 10-15 (any port). Beware of other conflicts! L0 & F0 are included but untested.
HAL_MSP_Private_Functions
[MSP_module, HAL_MSP]
Functions | |
void | HAL_SPI_MspInit (SPI_HandleTypeDef *hspi) |
SPI MSP Initialization This function configures the hardware resources used in this example:
| |
void | HAL_SPI_MspDeInit (SPI_HandleTypeDef *hspi) |
SPI MSP De-Initialization This function frees the hardware resources used in this example:
| |
void | HAL_TIM_PWM_MspInit (TIM_HandleTypeDef *htim_pwm) |
PWM MSP Initialization. | |
void | HAL_TIM_PWM_MspDeInit (TIM_HandleTypeDef *htim_pwm) |
PWM MSP De-Initialization. | |
void | HAL_TIM_PWM_PulseFinishedCallback (TIM_HandleTypeDef *htim) |
PWM Callback. | |
void | HAL_GPIO_EXTI_Callback (uint16_t GPIO_Pin) |
External Line Callback. |
Function Documentation
void HAL_GPIO_EXTI_Callback | ( | uint16_t | GPIO_Pin ) |
External Line Callback.
- Parameters:
-
[in] GPIO_Pin pin number
- Return values:
-
None
Definition at line 274 of file stm32f0xx_hal_msp.cpp.
void HAL_SPI_MspDeInit | ( | SPI_HandleTypeDef * | hspi ) |
SPI MSP De-Initialization This function frees the hardware resources used in this example:
- Disable the Peripheral's clock
- Revert GPIO configuration to its default state.
- Parameters:
-
[in] hspi SPI handle pointer
- Return values:
-
None
Definition at line 116 of file stm32f0xx_hal_msp.cpp.
void HAL_SPI_MspInit | ( | SPI_HandleTypeDef * | hspi ) |
SPI MSP Initialization This function configures the hardware resources used in this example:
- Peripheral's clock enable
- Peripheral's GPIO Configuration.
- Parameters:
-
[in] hspi SPI handle pointer
- Return values:
-
None
Definition at line 70 of file stm32f0xx_hal_msp.cpp.
void HAL_TIM_PWM_MspDeInit | ( | TIM_HandleTypeDef * | htim_pwm ) |
PWM MSP De-Initialization.
- Parameters:
-
[in] htim_pwm PWM handle pointer
- Return values:
-
None
Definition at line 205 of file stm32f0xx_hal_msp.cpp.
void HAL_TIM_PWM_MspInit | ( | TIM_HandleTypeDef * | htim_pwm ) |
PWM MSP Initialization.
- Parameters:
-
[in] htim_pwm PWM handle pointer
- Return values:
-
None
Definition at line 139 of file stm32f0xx_hal_msp.cpp.
void HAL_TIM_PWM_PulseFinishedCallback | ( | TIM_HandleTypeDef * | htim ) |
PWM Callback.
- Parameters:
-
[in] htim PWM handle pointer
- Return values:
-
None
Definition at line 240 of file stm32f0xx_hal_msp.cpp.
Generated on Tue Jul 12 2022 22:53:31 by 1.7.2