Testing tighter over current protection
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Fri, 29 Sep 2017 06:39:31 +0000 (23:39 -0700)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Fri, 29 Sep 2017 06:39:31 +0000 (23:39 -0700)
src/avr/src/config.h

index 91fa97281586340e7e920d127f09ddd993d3935f..247054cbcc20c0d94485c2258fa4903f8d5b70e4 100644 (file)
@@ -164,22 +164,15 @@ enum {
 
 
 // DRV8711 settings
-#if 0 // Doug's settings
-#define DRV8711_OFF   48
-#define DRV8711_BLANK (0x80 | DRV8711_BLANK_ABT_bm)
-#define DRV8711_DECAY (DRV8711_DECAY_DECMOD_AUTO_OPT | 6)
-
-#else
 #define DRV8711_OFF   12
 #define DRV8711_BLANK (0x32 | DRV8711_BLANK_ABT_bm)
 #define DRV8711_DECAY (DRV8711_DECAY_DECMOD_MIXED | 16)
-#endif
 
 #define DRV8711_STALL (DRV8711_STALL_SDCNT_2 | DRV8711_STALL_VDIV_4 | 200)
 #define DRV8711_DRIVE (DRV8711_DRIVE_IDRIVEP_50 |                       \
                        DRV8711_DRIVE_IDRIVEN_100 | DRV8711_DRIVE_TDRIVEP_250 | \
-                       DRV8711_DRIVE_TDRIVEN_250 | DRV8711_DRIVE_OCPDEG_2 | \
-                       DRV8711_DRIVE_OCPTH_500)
+                       DRV8711_DRIVE_TDRIVEN_250 | DRV8711_DRIVE_OCPDEG_1 | \
+                       DRV8711_DRIVE_OCPTH_250)
 #define DRV8711_TORQUE DRV8711_TORQUE_SMPLTH_200
 #define DRV8711_CTRL   (DRV8711_CTRL_ISGAIN_10 | DRV8711_CTRL_DTIME_450 | \
                         DRV8711_CTRL_EXSTALL_bm)