OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 3809|回复: 0

这是霍尔编程的结构体定义,不明白为什么定义这些数据,求解。

[复制链接]

5

主题

17

帖子

0

精华

初级会员

Rank: 2

积分
68
金钱
68
注册时间
2020-7-27
在线时间
11 小时
发表于 2020-8-12 16:22:33 | 显示全部楼层 |阅读模式
typedef struct { Uint16 CmtnTrigHall;    // Output: Commutation trigger for Mod6cnt input (0 or 0x7FFF)
                 Uint16 CapCounter;      // Variable: Running count of detected edges on ECAP1,2,3
                 Uint16 DebounceCount;   // Variable: Counter/debounce delay current value
                 Uint16 DebounceAmount;  // Parameter: Counter delay amount to validate/debounce GPIO readings
                 Uint16 HallGpio;        // Variable: Most recent logic level on ECAP/GPIO
                 Uint16 HallGpioBuffer;  // Variable: Buffer of last logic level on ECAP/GPIO while being debounced
                 Uint16 HallGpioAccepted; // Variable: Debounced logic level on ECAP/GPIO
                 Uint16 EdgeDebounced;   // Variable: Trigger from Debounce function to Hall_Drv, if = 0x7FFF edge is debounced
                 Uint16 HallMap[6];      // Variable: ECAP/GPIO logic levels for HallMapPointer = 0-5
                 Uint16 CapFlag;          // Variable: ECAP flags, indicating which ECAP detected the edge
                 Uint16 StallCount;       // Variable: If motor stalls, this counter overflow triggers
                                          //           commutation to start rotation. Rotation is defined as
                                          //           an edge detection of a hall signal.
                 Uint16 HallMapPointer;   // Input/Output (see note below): During hall map creation, this variable points to the
                                          //            current commutation state.  After map creation, it
                                          //            points to the next commutation state.
                 int16 Revolutions;       // Parameter: Running counter, with a revolution defined as 1-cycle
                                          //            of the 6 hall states
               }

正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-6-9 05:14

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表