nRF51822的Drive configuration的解释

nRF51822的Drive configuration的解释

SDK中相关配置
  • #define GPIO_PIN_CNF_DRIVE_S0S1 (0x00UL) /!< Standard ‘0’, Standard ‘1’. /
  • #define GPIO_PIN_CNF_DRIVE_H0S1 (0x01UL) /!< High ‘0’, Standard ‘1’. /
  • #define GPIO_PIN_CNF_DRIVE_S0H1 (0x02UL) /!< Standard ‘0’, High ‘1’. /
  • #define GPIO_PIN_CNF_DRIVE_H0H1 (0x03UL) /!< High ‘0’, High ‘1’. /
  • #define GPIO_PIN_CNF_DRIVE_D0S1 (0x04UL) /!< Disconnected ‘0’, Standard ‘1’. /
  • #define GPIO_PIN_CNF_DRIVE_D0H1 (0x05UL) /!< Disconnected ‘0’, High ‘1’. /
  • #define GPIO_PIN_CNF_DRIVE_S0D1 (0x06UL) /!< Standard ‘0’, Disconnected ‘1’. /
  • #define GPIO_PIN_CNF_DRIVE_H0D1 (0x07UL) /!< High ‘0’, Disconnected ‘1’. /
配置解释

The different options specify how a configured GPIO pin sinks current when you set it low (write 0 to the pin) and how a configured pin sources current when you set it high (write 1 to the pin).

  • Standard means the pin will be sourced or sinked with up to 0.5 mA for the assigned signal (high or low)
  • High source means the pin will be sourced with up to 5.0 mA for high signal
  • High sink means the pin will be sinked with up to 15.0 mA for low signal
  • Disconnected means there is no drive, the pin is high impedance. Consequently, there is no current flowing to or from the pin, no matter the drive of any external circuit connected to the pin
举例
  • Option GPIO_PIN_CNF_DRIVE_S0S1: When writing 0 to the configured pin, the pin is driven to low signal with up to 0.5mA. When writing 1 to the configured pin, the pin is driven to high signal with up to 0.5mA.
  • Option GPIO_PIN_CNF_DRIVE_H0D1: When writing 0 to the configured pin, the pin is driven to low signal with up to 15.0mA drive strength. When writing 1 to the configured pin, the pin is disconnected (no drive) and will be floating if it is not driven by an external pullup/pulldown resistor or IC.

Note: nRF51 can source+sink GPIO pins with maximum 15mA totally. This means that you should not let combined sink and source current of all GPIOs exceed 15mA at any time.

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值