Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: Stepper_Matlab_Control SunTracker_BLE Stepper_Matlab_Control MemsMotorControl ... more
Fork of X_NUCLEO_IHM01A1 by
Motor Control Library
Introduction
Library to handle the X-NUCLEO-IHM01A1 Motor Control Expansion Board based on the the L6474 component.
Daisy-Chain Configuration
This board can be stacked up to three times so that the L6474 components will be connected in daisy-chain configuration. For this purpose, some resistors must be correctly connected on the boards as depicted here below:
Platform compatibility
- NUCLEO boards have been tested with the default configuration provided by the HelloWorld_IHM01A1 example.
- LPCXpresso11U68 board has been tested with the following patch:
- to connect with a wire from the LPCX’s
D4pin to the IHM01A1’sD9pin; - to initialize the pwm PinName variable with
D4rather thanD9.
- to connect with a wire from the LPCX’s
- FRDM-K64F board has been tested with the following patch:
- to connect with a wire from the FRDM’s
D4pin to the IHM01A1’sD8pin; - to initialize the standby_reset PinName variable with
D4rather thanD8.
- to connect with a wire from the FRDM’s
Example Applications
- HelloWorld_IHM01A1
- HelloWorld_IHM01A1_2Motors
- MotorControl_IHM01A1
- MemsMotorControl
- MemsMotorControl_IHM01A1_IKS01A2
Diff: Components/l6474/l6474_class.h
- Revision:
- 6:a47569fc7534
- Parent:
- 5:d3c78f12a78d
- Child:
- 7:f7e0c3621f77
--- a/Components/l6474/l6474_class.h Wed Nov 18 18:41:55 2015 +0000
+++ b/Components/l6474/l6474_class.h Thu Nov 19 10:56:34 2015 +0000
@@ -108,9 +108,6 @@
*--------------------------------------------------------------------*/
flagInterruptCallback = 0;
errorHandlerCallback = 0;
- spiPreemtionByIsr = 0;
- isrFlag = 0;
- //devicePrm = 0;
deviceInstance = numberOfDevices;
numberOfDevices++;
memset(spiTxBursts, 0, L6474_CMD_ARG_MAX_NB_BYTES * MAX_NUMBER_OF_DEVICES * sizeof(uint8_t));
@@ -655,11 +652,11 @@
*------------------------------------------------------------------------*/
void (*flagInterruptCallback)(void);
void (*errorHandlerCallback)(uint16_t error);
- bool spiPreemtionByIsr;
- bool isrFlag;
deviceParams_t devicePrm;
uint8_t deviceInstance;
static uint8_t numberOfDevices;
+ static bool spiPreemtionByIsr;
+ static bool isrFlag;
static uint8_t spiTxBursts[L6474_CMD_ARG_MAX_NB_BYTES][MAX_NUMBER_OF_DEVICES];
static uint8_t spiRxBursts[L6474_CMD_ARG_MAX_NB_BYTES][MAX_NUMBER_OF_DEVICES];
};

X-NUCLEO-IHM01A1 Stepper Motor Driver