Library to handle the X_NUCLEO_IHM02A1 Motor Control Expansion Board based on the L6470 component.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   HelloWorld_IHM02A1 ConcorsoFinal HelloWorld_IHM02A1_mbedOS HelloWorld_IHM02A1-Serialinterpreter ... more

Fork of X_NUCLEO_IHM02A1 by ST Expansion SW Team

Motor Control Library

Introduction

Library to handle the X-NUCLEO-IHM02A1 Motor Control Expansion Board based on the the L6470 component.

Daisy-Chain Configuration

The two L6470 components mounted on this board are connected in daisy-chain configuration. This board can be stacked up to four times so that the eight L6470 components will be connected two-by-two in daisy-chain configuration.

Concerning the SSEL pin of the SPI communication, each expansion board must be in one of the following configuration:

  • SB_23 resistor connected only: SSEL on pin A2;
  • SB_7 resistor connected only: SSEL on pin D2;
  • SB_8 resistor connected only: SSEL on pin D10;
  • SB_9 resistor connected only: SSEL on pin D5.

Arduino Connector Compatibility Warning

X-NUCLEO-IHM02A1 is Arduino compatible with one exception: instead of using D13 pin to drive the SPI clock, it uses D3 pin, hence the default configuration for this library is with the SPI clock on D3 pin.

To be fully Arduino compatible the following patch is required:

  • to remove the SB34 resistor;
  • to solder the SB12 resistor.

Alternatively, you can route the Nucleo board’s D13 pin directly to the expansion board’s D3 pin with a wire. In case you patch your expansion board or route the pin, the SPI clock will be driven on D13 pin rather than on D3 pin, and you have also to initialize the sclk PinName variable with D13 rather than D3. This patch is known to be required, for example, on the following boards: NUCLEO-F103RB, NUCLEO-F302RB, NUCLEO-F411RE, and NUCLEO-F429ZI.

If you use D13 pin for the SPI clock, please be aware that on STM32 Nucleo boards you may not drive the LED, otherwise you will get a conflict: the LED on STM32 Nucleo boards is connected to the D13 pin.

Example Applications

Changes

RevisionDateWhoCommit message
24:ff67801d7cd7 2017-03-13 Davidroid Typo corrected. default tip
23:cf489f2ab072 2017-03-10 Davidroid Aligned to ARM mbed coding style.
22:ba7f4131a5e0 2017-03-10 davide.aliprandi@st.com Aligning to ARM mbed coding style.
21:1b7f3e002688 2017-03-01 Davidroid Fitting mbed coding style.
20:e6fa636dbdea 2016-09-27 Davidroid ST_INTERFACES added.
19:b684efb6ba93 2016-09-27 Davidroid ST_INTERFACES added.
18:ddf3d5dc8137 2016-04-08 Davidroid + Some comments updated.
17:4b3dc908724f 2016-04-07 Davidroid + StepperMotor interface updated: step-modes added, getter/setter methods for parameters removed.
16:0d5be428b264 2016-03-11 Davidroid + Updated with the new version of common libraries.
15:31785d1acd4b 2016-02-15 Davidroid + Updated some comments.
14:e614697ebf34 2016-02-09 Davidroid + Updated with the new template's syntax.
13:25a579b9b7c3 2016-01-19 Davidroid + "L6470_Config()" function's prototype updated to be consistent with the "MICROSTEPPING_MOTOR_DrvVTableTypeDef" type.
12:a942d51c488b 2016-01-15 Davidroid + Typos corrected.
11:1aca63b2f034 2016-01-14 Davidroid + <INTERFACE>_InitTypeDef moved to <COMPONENT>_InitTypeDef.
10:aa68441705b2 2016-01-04 Davidroid + Added check on expansion board's stackability.
9:d70452d7a1e1 2015-12-11 Davidroid + Initialization structure moved from the BSP to the main application.
8:a9513361a2ec 2015-12-10 Davidroid + Comments related to the component updated.
7:3bb27256c3ed 2015-12-10 Davidroid + Comments related to the component updated.
6:c62aa608a493 2015-12-09 Davidroid + Correction of a typo.
5:3cde564db574 2015-12-01 Davidroid + Added SoftHiz() and HardHiz() to the StepperMotor Interface.
4:381d76f5b0b4 2015-11-26 Davidroid + Updated with the new structure of the Stm32CubeTOO tool.
3:e3f6f4474d98 2015-11-25 Davidroid + Expansion Board class updated to be non-singleton.; + Expansion Board class updated with information on SSEL pins needed when stacking more boards.
2:3ed992ffeada 2015-11-25 Davidroid + Some comments updated.
1:b78dab6d2c58 2015-11-25 Davidroid + Implemented all the StepperMotor's APIs.
0:92706998571a 2015-11-20 Davidroid Library to handle the X_NUCLEO_IHM02A1 Motor Control Expansion Board based on the the L6470 component.