OpenEdv-开源电子网

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

STM32F103标准库函数的注释 This structure is used only with TIM1 and TIM8.有些困惑

[复制链接]

8

主题

42

帖子

0

精华

初级会员

Rank: 2

积分
183
金钱
183
注册时间
2021-3-11
在线时间
30 小时
发表于 2021-11-17 10:46:49 | 显示全部楼层 |阅读模式
1金钱

这句注释的意思是这个结构体仅仅只能用在高级定时器TIM1和TIM8上的意思吗?
还是说有其他的含义?

WeCom Screenshot_20211117103557.png

最佳答案

查看完整内容[请看2#楼]

这个结构体只用于高级定时器TIM1和TIM8,你可以找一下相关的这种操作看看就明白了的
勤学如春起之苗,不见其增,日有所长
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

0

主题

668

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
1926
金钱
1926
注册时间
2021-8-13
在线时间
262 小时
发表于 2021-11-17 10:46:50 | 显示全部楼层
这个结构体只用于高级定时器TIM1和TIM8,你可以找一下相关的这种操作看看就明白了的
回复

使用道具 举报

14

主题

821

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
2106
金钱
2106
注册时间
2021-7-17
在线时间
659 小时
发表于 2021-11-17 11:00:56 | 显示全部楼层
是的,这个结构体只能用在TIM1和TIM8定时器中
回复

使用道具 举报

8

主题

42

帖子

0

精华

初级会员

Rank: 2

积分
183
金钱
183
注册时间
2021-3-11
在线时间
30 小时
 楼主| 发表于 2021-11-17 11:18:03 | 显示全部楼层
可为什么通用定时器TIM5也可以用这个结构体?
WeCom Screenshot_20211117111530.png
勤学如春起之苗,不见其增,日有所长
回复

使用道具 举报

8

主题

42

帖子

0

精华

初级会员

Rank: 2

积分
183
金钱
183
注册时间
2021-3-11
在线时间
30 小时
 楼主| 发表于 2021-11-17 11:22:36 | 显示全部楼层
可为什么通用定时器TIM5也可以用这个结构体?
回复

使用道具 举报

14

主题

821

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
2106
金钱
2106
注册时间
2021-7-17
在线时间
659 小时
发表于 2021-11-17 11:34:35 | 显示全部楼层
  1. /**
  2.   * @brief  BDTR structure definition
  3.   * [url=home.php?mod=space&uid=60778]@note[/url]   This structure is used only with TIM1 and TIM8.   
  4.   */

  5. typedef struct
  6. {

  7.   uint16_t TIM_OSSRState;        /*!< Specifies the Off-State selection used in Run mode.
  8.                                       This parameter can be a value of [url=home.php?mod=space&uid=203608]@Ref[/url] OSSR_Off_State_Selection_for_Run_mode_state */

  9.   uint16_t TIM_OSSIState;        /*!< Specifies the Off-State used in Idle state.
  10.                                       This parameter can be a value of @ref OSSI_Off_State_Selection_for_Idle_mode_state */

  11.   uint16_t TIM_LOCKLevel;        /*!< Specifies the LOCK level parameters.
  12.                                       This parameter can be a value of @ref Lock_level */

  13.   uint16_t TIM_DeadTime;         /*!< Specifies the delay time between the switching-off and the
  14.                                       switching-on of the outputs.
  15.                                       This parameter can be a number between 0x00 and 0xFF  */

  16.   uint16_t TIM_Break;            /*!< Specifies whether the TIM Break input is enabled or not.
  17.                                       This parameter can be a value of @ref Break_Input_enable_disable */

  18.   uint16_t TIM_BreakPolarity;    /*!< Specifies the TIM Break Input pin polarity.
  19.                                       This parameter can be a value of @ref Break_Polarity */

  20.   uint16_t TIM_AutomaticOutput;  /*!< Specifies whether the TIM Automatic Output feature is enabled or not.
  21.                                       This parameter can be a value of @ref TIM_AOE_Bit_Set_Reset */
  22. } TIM_BDTRInitTypeDef;
复制代码
回复

使用道具 举报

8

主题

42

帖子

0

精华

初级会员

Rank: 2

积分
183
金钱
183
注册时间
2021-3-11
在线时间
30 小时
 楼主| 发表于 2021-11-17 11:50:19 | 显示全部楼层

能解释一下吗?
勤学如春起之苗,不见其增,日有所长
回复

使用道具 举报

8

主题

42

帖子

0

精华

初级会员

Rank: 2

积分
183
金钱
183
注册时间
2021-3-11
在线时间
30 小时
 楼主| 发表于 2021-11-17 11:55:51 | 显示全部楼层

明白了明白了
This structure is used only with TIM1 and TIM8. 指的是 这个结构体BDTR structure definition
勤学如春起之苗,不见其增,日有所长
回复

使用道具 举报

8

主题

42

帖子

0

精华

初级会员

Rank: 2

积分
183
金钱
183
注册时间
2021-3-11
在线时间
30 小时
 楼主| 发表于 2021-11-17 11:56:15 | 显示全部楼层
勤学如春起之苗,不见其增,日有所长
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-6-15 05:00

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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