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

MOTOR_CONTROL_Weak_Private_Functions

MOTOR_CONTROL_Weak_Private_Functions
[MOTOR_CONTROL]

Functions

__weak motorDrv_t * L6474_GetMotorHandle (void)
 Get motor handle for L6474.
__weak motorDrv_t * Powerstep01_GetMotorHandle (void)
 Get motor handle for Powerstep.

Function Documentation

__weak motorDrv_t* L6474_GetMotorHandle ( void   )

Get motor handle for L6474.

Definition at line 98 of file motorcontrol.cpp.

__weak motorDrv_t* Powerstep01_GetMotorHandle ( void   )

Get motor handle for Powerstep.

Definition at line 100 of file motorcontrol.cpp.