查看: 1500|回复: 0

飞思卡尔mke02系列 PIT定时器的当前值读取

[复制链接]

该用户从未签到

发表于 2016-7-25 11:23:42 | 显示全部楼层 |阅读模式
分享到:
在飞思卡尔mke02系列中,pit.h中没有FTMX_CVAL定义,不知道如何添加?求指点,本人是菜鸟,第一次想用c语言写程序,更别说c++了,所以,官方提供的程序也不太看得懂。不知道下面的添加是否有效
typedef struct
{   
    uint8_t bFreeze         : 1;    /*!< 1: stop in debug mode, 0: run in debug mode */
    uint8_t bModuleDis      : 1;    /*!< 1: PIT module is disable, 0: PIT module is enable */   
    uint8_t bReserved0      : 1;    /*!< reserved bit */
    uint8_t bReserved1      : 5;    /*!< reserved bit */
    uint8_t bTimerEn        : 1;    /*!< 1: channel timer is enable, 0: channel timer is disable */
    uint8_t bInterruptEn    : 1;    /*!< 1: channel timer interrupt is enable, 0: channel timer interrupt is disable */
    uint8_t bChainMode      : 1;    /*!< 1: chain mode is enable, 0: chain mode is disable */
    uint8_t bReserved2      : 5;    /*!< reserved bit */
    uint8_t bFlag           : 1;    /*!< 1: flag is set,and write 1 to clear flag, 0: no flag is set */
    uint8_t bReserved3      : 7;    /*!< reserved bit */   
    uint32_t u32LoadValue      ;    /*!< 32-bit channel load value */  
    uint32_t u32CVAL;// 这是我添加的,可在主函数中读出来的值始终为0,
} PIT_ConfigType, *PIT_ConfigPtr;
回复

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /2 下一条



手机版|小黑屋|与非网

GMT+8, 2024-4-26 20:55 , Processed in 0.107111 second(s), 15 queries , MemCache On.

ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

苏公网安备 32059002001037号

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.