Library to handle the X-NUCLEO-IHM01A1 Motor Control Expansion Board based on the L6474 component.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   Stepper_Matlab_Control SunTracker_BLE Stepper_Matlab_Control MemsMotorControl ... more

Fork of X_NUCLEO_IHM01A1 by ST Expansion SW Team

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:

/media/uploads/Davidroid/daisychaintable.png

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 D4 pin to the IHM01A1’s D9 pin;
    • to initialize the pwm PinName variable with D4 rather than D9.
  • FRDM-K64F board has been tested with the following patch:
    • to connect with a wire from the FRDM’s D4 pin to the IHM01A1’s D8 pin;
    • to initialize the standby_reset PinName variable with D4 rather than D8.

Example Applications

Revision:
5:d3c78f12a78d
Parent:
1:b38ebb8ea286
Child:
8:42e0b00b1e4d
--- a/Components/l6474/l6474.h	Fri Nov 13 12:56:06 2015 +0000
+++ b/Components/l6474/l6474.h	Wed Nov 18 18:41:55 2015 +0000
@@ -444,14 +444,14 @@
   void (*flagInterruptCallback)(void);
   /// Function pointer to error handler call back
   void (*errorHandlerCallback)(uint16_t error);
-  uint8_t spiTxBursts[L6474_CMD_ARG_MAX_NB_BYTES]; //[MAX_NUMBER_OF_DEVICES];
-  uint8_t spiRxBursts[L6474_CMD_ARG_MAX_NB_BYTES]; //[MAX_NUMBER_OF_DEVICES];
   bool spiPreemtionByIsr; // = FALSE;
   bool isrFlag; // = FALSE;
   /// L6474 Device Paramaters structure
   deviceParams_t devicePrm; //[MAX_NUMBER_OF_DEVICES];
   uint8_t numberOfDevices;
   uint8_t deviceInstance;
+  uint8_t spiTxBursts[L6474_CMD_ARG_MAX_NB_BYTES][MAX_NUMBER_OF_DEVICES];
+  uint8_t spiRxBursts[L6474_CMD_ARG_MAX_NB_BYTES][MAX_NUMBER_OF_DEVICES];
 } L6474_DrvDataTypeDef;