TI piccolo手册中“对于可以用作ePWM的输出的引脚,默认内部上拉电阻禁止使能“,请问如果ePWM上拉电阻使能的话会有什么后果?谢谢!
- void InitEPwm1Gpio(void)
- {
- EALLOW;
- /* Disable internal pull-up for the selected output pins
- for reduced power consumption */
- // Pull-ups can be enabled or disabled by the user.
- // Comment out other unwanted lines.
- GpioCtrlRegs.GPAPUD.bit.GPIO0 = 1; // Disable pull-up on GPIO0 (EPWM1A)
- GpioCtrlRegs.GPAPUD.bit.GPIO1 = 1; // Disable pull-up on GPIO1 (EPWM1B)
- /* Configure EPWM-1 pins using GPIO regs*/
- // This specifies which of the possible GPIO pins will be EPWM1 functional pins.
- // Comment out other unwanted lines.
- GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // Configure GPIO0 as EPWM1A
- GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1; // Configure GPIO1 as EPWM1B
- EDIS;
- }
- 改为
- void InitEPwm1Gpio(void)
- {
- EALLOW;
- /* Disable internal pull-up for the selected output pins
- for reduced power consumption */
- // Pull-ups can be enabled or disabled by the user.
- // Comment out other unwanted lines.
- GpioCtrlRegs.GPAPUD.bit.GPIO0 = 0 // Enable pull-up on GPIO0 (EPWM1A)
- GpioCtrlRegs.GPAPUD.bit.GPIO1 = 0 // Enalbe pull-up on GPIO1 (EPWM1B)
- /* Configure EPWM-1 pins using GPIO regs*/
- // This specifies which of the possible GPIO pins will be EPWM1 functional pins.
- // Comment out other unwanted lines.
- GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // Configure GPIO0 as EPWM1A
- GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1; // Configure GPIO1 as EPWM1B
- EDIS;
- }
复制代码
此帖出自
小平头技术问答
一周热门 更多>