|
@@ -378,9 +378,11 @@
|
|
|
|
|
|
|
|
#define ENC_MAX_interpolation 1.0F
|
|
#define ENC_MAX_interpolation 1.0F
|
|
|
|
|
|
|
|
|
|
+/* 200hz机械转速,200K(12000RPM),AB信号高低电平宽度5us/2=2.5us, 按照timer滤波系数12算,1/7.5*8=1.06us采集到信号没有变才认为是有效值*/
|
|
|
#define CONFIG_ENC_FILTER_NR 12 //1100: fSAMP=fDTS/16, N=8,采样率 120M/16 = 7.5M
|
|
#define CONFIG_ENC_FILTER_NR 12 //1100: fSAMP=fDTS/16, N=8,采样率 120M/16 = 7.5M
|
|
|
#define CONFIG_PWM_FILTER_NR 12
|
|
#define CONFIG_PWM_FILTER_NR 12
|
|
|
-
|
|
|
|
|
|
|
+/* Z 信号宽度设计为4LSB,200hz机械转速,200K(12000RPM),Z脉冲宽度5us*4=20us, 按照timer滤波系数15算,1/3.75*8=2.1us采集到信号没有变才认为是有效值*/
|
|
|
|
|
+#define CONFIG_Z_IDX_FILTER_NR 15///1111: fSAMP=fDTS/32, N=8,采样率 120M/32 = 3.75M
|
|
|
#ifdef CONFIG_PWM_UV_SWAP
|
|
#ifdef CONFIG_PWM_UV_SWAP
|
|
|
#define ENCODER_CC_INVERT 1
|
|
#define ENCODER_CC_INVERT 1
|
|
|
#endif
|
|
#endif
|