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: mbed X_NUCLEO_IHM01A1
Diff: main.cpp
- Revision:
- 29:a80a213c3c94
- Parent:
- 27:e09aa231c16d
- Child:
- 34:543d0d1147d9
diff -r e15fc9311ca3 -r a80a213c3c94 main.cpp
--- a/main.cpp Wed Aug 03 10:11:21 2016 +0000
+++ b/main.cpp Thu Sep 08 12:39:58 2016 +0000
@@ -60,7 +60,9 @@
#define DELAY_3 6000
#define DELAY_4 8000
-/* Speed in step/s. */
+/* Speed in pps (Pulses Per Second).
+ In Full Step mode: 1 pps = 1 step/s).
+ In 1/N Step Mode: N pps = 1 step/s). */
#define SPEED_1 2400
#define SPEED_2 1200
@@ -70,10 +72,10 @@
/* Initialization parameters. */
L6474_Init_t init =
{
- 160, /* Acceleration rate in step/s2. Range: (0..+inf). */
- 160, /* Deceleration rate in step/s2. Range: (0..+inf). */
- 1600, /* Maximum speed in step/s. Range: (30..10000]. */
- 800, /* Minimum speed in step/s. Range: [30..10000). */
+ 160, /* Acceleration rate in pps^2. Range: (0..+inf). */
+ 160, /* Deceleration rate in pps^2. Range: (0..+inf). */
+ 1600, /* Maximum speed in pps. Range: (30..10000]. */
+ 800, /* Minimum speed in pps. Range: [30..10000). */
250, /* Torque regulation current in mA. Range: 31.25mA to 4000mA. */
L6474_OCD_TH_750mA, /* Overcurrent threshold (OCD_TH register). */
L6474_CONFIG_OC_SD_ENABLE, /* Overcurrent shutwdown (OC_SD field of CONFIG register). */