请问如果ePWM上拉电阻使能的话会有什么后果?

2019-03-24 09:02发布

TI piccolo手册中“对于可以用作ePWM的输出的引脚,默认内部上拉电阻禁止使能“,请问如果ePWM上拉电阻使能的话会有什么后果?谢谢!
  1. void InitEPwm1Gpio(void)
  2. {
  3.    EALLOW;

  4. /* Disable internal pull-up for the selected output pins
  5.    for reduced power consumption */
  6. // Pull-ups can be enabled or disabled by the user.
  7. // Comment out other unwanted lines.

  8.     GpioCtrlRegs.GPAPUD.bit.GPIO0 = 1;    // Disable pull-up on GPIO0 (EPWM1A)
  9.     GpioCtrlRegs.GPAPUD.bit.GPIO1 = 1;    // Disable pull-up on GPIO1 (EPWM1B)

  10. /* Configure EPWM-1 pins using GPIO regs*/
  11. // This specifies which of the possible GPIO pins will be EPWM1 functional pins.
  12. // Comment out other unwanted lines.

  13.     GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;   // Configure GPIO0 as EPWM1A
  14.     GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1;   // Configure GPIO1 as EPWM1B

  15.     EDIS;
  16. }

  17. 改为

  18. void InitEPwm1Gpio(void)
  19. {
  20.    EALLOW;

  21. /* Disable internal pull-up for the selected output pins
  22.    for reduced power consumption */
  23. // Pull-ups can be enabled or disabled by the user.
  24. // Comment out other unwanted lines.

  25.     GpioCtrlRegs.GPAPUD.bit.GPIO0 = 0   // Enable pull-up on GPIO0 (EPWM1A)
  26.     GpioCtrlRegs.GPAPUD.bit.GPIO1 = 0    // Enalbe pull-up on GPIO1 (EPWM1B)

  27. /* Configure EPWM-1 pins using GPIO regs*/
  28. // This specifies which of the possible GPIO pins will be EPWM1 functional pins.
  29. // Comment out other unwanted lines.

  30.     GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;   // Configure GPIO0 as EPWM1A
  31.     GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1;   // Configure GPIO1 as EPWM1B

  32.     EDIS;
  33. }
复制代码

此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
2条回答
dontium
2019-03-24 15:57
< :TI_MSP430_内容页_SA7 --> 楼主看看GPIO MUX的功能。

一周热门 更多>

相关问题

    相关文章