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.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

HAL_MSP

HAL_MSP

HAL MSP module. More...

Modules

 HAL_MSP_Private_Functions

Functions

void BSP_MotorControl_StepClockHandler (uint8_t deviceId)
 Handles the device state machine at each ste.
void BSP_MotorControl_FlagInterruptHandler (void)
 Handlers of the flag interrupt which calls the user callback (if defined)

Detailed Description

HAL MSP module.


Function Documentation

void BSP_MotorControl_FlagInterruptHandler ( void   )

Handlers of the flag interrupt which calls the user callback (if defined)

Parameters:
None
Return values:
None

Definition at line 228 of file motorcontrol.cpp.

void BSP_MotorControl_StepClockHandler ( uint8_t  deviceId )

Handles the device state machine at each ste.

Parameters:
[in]deviceId(from 0 to 2)
Return values:
None
Note:
Must only be called by the timer ISR

Definition at line 698 of file motorcontrol.cpp.