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

Files at this revision

API Documentation at this revision

Comitter:
gregeric
Date:
Fri Sep 18 12:10:45 2015 +0000
Parent:
4:8f6fbb88c753
Child:
6:19c1b4a04c24
Commit message:
Fix other platform re main.h rename to ihm01a1.h

Changed in this revision

IHM01A1/stm32f0xx_hal_msp.cpp Show annotated file Show diff for this revision Revisions of this file
IHM01A1/stm32f0xx_it.h Show annotated file Show diff for this revision Revisions of this file
--- a/IHM01A1/stm32f0xx_hal_msp.cpp	Fri Sep 18 12:08:48 2015 +0000
+++ b/IHM01A1/stm32f0xx_hal_msp.cpp	Fri Sep 18 12:10:45 2015 +0000
@@ -37,7 +37,7 @@
 #ifdef TARGET_STM32F0
 /* Includes ------------------------------------------------------------------*/
 #include "mbed.h"
-#include "main.h"
+#include "ihm01a1.h"
 
 
 /** @defgroup MSP_module
--- a/IHM01A1/stm32f0xx_it.h	Fri Sep 18 12:08:48 2015 +0000
+++ b/IHM01A1/stm32f0xx_it.h	Fri Sep 18 12:10:45 2015 +0000
@@ -44,7 +44,7 @@
 #endif 
 
 /* Includes ------------------------------------------------------------------*/
-#include "main.h"
+#include "ihm01a1.h"
 
 /* Exported types ------------------------------------------------------------*/
 /* Exported constants --------------------------------------------------------*/