TMS320F28069外部20M时钟 内部倍频到80M 外设时钟开启如下
SysCtrlRegs.PCLKCR1.bit.EPWM1ENCLK = 0;//1; // ePWM1
SysCtrlRegs.PCLKCR1.bit.EPWM2ENCLK = 0;//1; // ePWM2
SysCtrlRegs.PCLKCR1.bit.EPWM3ENCLK = 0;//1; // ePWM3
SysCtrlRegs.PCLKCR1.bit.EPWM4ENCLK = 0;//1; // ePWM4
SysCtrlRegs.PCLKCR1.bit.EPWM5ENCLK = 0;//1; // ePWM5
SysCtrlRegs.PCLKCR1.bit.EPWM6ENCLK = 0;//1; // ePWM6
SysCtrlRegs.PCLKCR1.bit.EPWM7ENCLK = 0;//1; // ePWM7
SysCtrlRegs.PCLKCR1.bit.EPWM8ENCLK = 0;//0;//1; // ePWM8
SysCtrlRegs.PCLKCR0.bit.HRPWMENCLK = 0;//1; // HRPWM
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;//1; // Enable TBCLK within the ePWM
SysCtrlRegs.PCLKCR1.bit.EQEP1ENCLK = 0;//1; // eQEP1
SysCtrlRegs.PCLKCR1.bit.EQEP2ENCLK = 0;//1; // eQEP2
SysCtrlRegs.PCLKCR1.bit.ECAP1ENCLK = 0;//1; // eCAP1
SysCtrlRegs.PCLKCR1.bit.ECAP2ENCLK = 1; // eCAP2
SysCtrlRegs.PCLKCR1.bit.ECAP3ENCLK = 0;//1; // eCAP3
SysCtrlRegs.PCLKCR2.bit.HRCAP1ENCLK = 0;//1; // HRCAP1
SysCtrlRegs.PCLKCR2.bit.HRCAP2ENCLK = 0;//1; // HRCAP2
SysCtrlRegs.PCLKCR2.bit.HRCAP3ENCLK = 0;//1; // HRCAP3
SysCtrlRegs.PCLKCR2.bit.HRCAP4ENCLK = 0;//1; // HRCAP4
SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1; // ADC
SysCtrlRegs.PCLKCR3.bit.COMP1ENCLK = 0;//1; // COMP1
SysCtrlRegs.PCLKCR3.bit.COMP2ENCLK = 0;//1; // COMP2
SysCtrlRegs.PCLKCR3.bit.COMP3ENCLK = 0;//1; // COMP3
SysCtrlRegs.PCLKCR3.bit.CPUTIMER0ENCLK = 1; // CPU Timer 0
SysCtrlRegs.PCLKCR3.bit.CPUTIMER1ENCLK = 1; // CPU Timer 1
SysCtrlRegs.PCLKCR3.bit.CPUTIMER2ENCLK = 1; // CPU Timer 2
SysCtrlRegs.PCLKCR3.bit.DMAENCLK = 1; // DMA
SysCtrlRegs.PCLKCR3.bit.CLA1ENCLK = 1; // CLA1
SysCtrlRegs.PCLKCR3.bit.USB0ENCLK = 0;//1; // USB0
SysCtrlRegs.PCLKCR0.bit.I2CAENCLK = 0;//1; // I2C-A
SysCtrlRegs.PCLKCR0.bit.SPIAENCLK = 0;//1; // SPI-A
SysCtrlRegs.PCLKCR0.bit.SPIBENCLK = 0;//1; // SPI-B
SysCtrlRegs.PCLKCR0.bit.SCIAENCLK = 0;//1; // SCI-A
SysCtrlRegs.PCLKCR0.bit.SCIBENCLK = 0;//1; // SCI-B
SysCtrlRegs.PCLKCR0.bit.MCBSPAENCLK = 0;//1; // McBSP-A
SysCtrlRegs.PCLKCR0.bit.ECANAENCLK=0;//1; // eCAN-A
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;//1; // Enable TBCLK within the ePWM
其中使用了T0 T1 T2 ECAP2 ADC其他外设时钟都关掉了
但是实际测试下来 CPU功耗为 110毫安左右 我把工作的频率降下来 可是功耗还是不变!!
难道TMS320F28069功耗这么大吗? 有没有办法降低功耗呢?
Forrest:
这个问题可以参考下面的帖子:
www.deyisupport.com/…/7347.aspx
降低功耗主要是下面几个方法,楼主谈到的关闭外设只是其中之一,具体每个外设的耗电可以参考datasheet的Reducing Current Consumption章节
1、将MUX默认设置为GPIO而不是外设,同时将默认的上拉使能disable掉。
2、PCLKCR中关闭不要的外设
3、XCLKOUT也需要关闭,因为它大概会带来15mA的电流
4、楼主可以在上电后把程序copy到RAM,都在RAM中运行然后关闭FLASH,这样可以节约十几mA的电流
降低频率,不用片上的VREG,用外部的。会起到降低功耗的作用,效果不会很明显。
TMS320F28069外部20M时钟 内部倍频到80M 外设时钟开启如下
SysCtrlRegs.PCLKCR1.bit.EPWM1ENCLK = 0;//1; // ePWM1
SysCtrlRegs.PCLKCR1.bit.EPWM2ENCLK = 0;//1; // ePWM2
SysCtrlRegs.PCLKCR1.bit.EPWM3ENCLK = 0;//1; // ePWM3
SysCtrlRegs.PCLKCR1.bit.EPWM4ENCLK = 0;//1; // ePWM4
SysCtrlRegs.PCLKCR1.bit.EPWM5ENCLK = 0;//1; // ePWM5
SysCtrlRegs.PCLKCR1.bit.EPWM6ENCLK = 0;//1; // ePWM6
SysCtrlRegs.PCLKCR1.bit.EPWM7ENCLK = 0;//1; // ePWM7
SysCtrlRegs.PCLKCR1.bit.EPWM8ENCLK = 0;//0;//1; // ePWM8
SysCtrlRegs.PCLKCR0.bit.HRPWMENCLK = 0;//1; // HRPWM
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;//1; // Enable TBCLK within the ePWM
SysCtrlRegs.PCLKCR1.bit.EQEP1ENCLK = 0;//1; // eQEP1
SysCtrlRegs.PCLKCR1.bit.EQEP2ENCLK = 0;//1; // eQEP2
SysCtrlRegs.PCLKCR1.bit.ECAP1ENCLK = 0;//1; // eCAP1
SysCtrlRegs.PCLKCR1.bit.ECAP2ENCLK = 1; // eCAP2
SysCtrlRegs.PCLKCR1.bit.ECAP3ENCLK = 0;//1; // eCAP3
SysCtrlRegs.PCLKCR2.bit.HRCAP1ENCLK = 0;//1; // HRCAP1
SysCtrlRegs.PCLKCR2.bit.HRCAP2ENCLK = 0;//1; // HRCAP2
SysCtrlRegs.PCLKCR2.bit.HRCAP3ENCLK = 0;//1; // HRCAP3
SysCtrlRegs.PCLKCR2.bit.HRCAP4ENCLK = 0;//1; // HRCAP4
SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1; // ADC
SysCtrlRegs.PCLKCR3.bit.COMP1ENCLK = 0;//1; // COMP1
SysCtrlRegs.PCLKCR3.bit.COMP2ENCLK = 0;//1; // COMP2
SysCtrlRegs.PCLKCR3.bit.COMP3ENCLK = 0;//1; // COMP3
SysCtrlRegs.PCLKCR3.bit.CPUTIMER0ENCLK = 1; // CPU Timer 0
SysCtrlRegs.PCLKCR3.bit.CPUTIMER1ENCLK = 1; // CPU Timer 1
SysCtrlRegs.PCLKCR3.bit.CPUTIMER2ENCLK = 1; // CPU Timer 2
SysCtrlRegs.PCLKCR3.bit.DMAENCLK = 1; // DMA
SysCtrlRegs.PCLKCR3.bit.CLA1ENCLK = 1; // CLA1
SysCtrlRegs.PCLKCR3.bit.USB0ENCLK = 0;//1; // USB0
SysCtrlRegs.PCLKCR0.bit.I2CAENCLK = 0;//1; // I2C-A
SysCtrlRegs.PCLKCR0.bit.SPIAENCLK = 0;//1; // SPI-A
SysCtrlRegs.PCLKCR0.bit.SPIBENCLK = 0;//1; // SPI-B
SysCtrlRegs.PCLKCR0.bit.SCIAENCLK = 0;//1; // SCI-A
SysCtrlRegs.PCLKCR0.bit.SCIBENCLK = 0;//1; // SCI-B
SysCtrlRegs.PCLKCR0.bit.MCBSPAENCLK = 0;//1; // McBSP-A
SysCtrlRegs.PCLKCR0.bit.ECANAENCLK=0;//1; // eCAN-A
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;//1; // Enable TBCLK within the ePWM
其中使用了T0 T1 T2 ECAP2 ADC其他外设时钟都关掉了
但是实际测试下来 CPU功耗为 110毫安左右 我把工作的频率降下来 可是功耗还是不变!!
难道TMS320F28069功耗这么大吗? 有没有办法降低功耗呢?
bluse:
回复 Forrest:
你好! 感谢你的帮忙!
我现在把 1、将MUX默认设置为GPIO而不是外设,同时将默认的上拉使能disable掉。
外设只开了 ECAP2 T0 T1 T2 ADC 功耗还是有103mA
请问如何把程序 copy到RAM,都在RAM中运行然后关闭FLASH,有相关例程吗? 能告诉吗? 还有XCLKOUT在哪儿关闭 找不到相应的寄存器 呵呵
TMS320F28069外部20M时钟 内部倍频到80M 外设时钟开启如下
SysCtrlRegs.PCLKCR1.bit.EPWM1ENCLK = 0;//1; // ePWM1
SysCtrlRegs.PCLKCR1.bit.EPWM2ENCLK = 0;//1; // ePWM2
SysCtrlRegs.PCLKCR1.bit.EPWM3ENCLK = 0;//1; // ePWM3
SysCtrlRegs.PCLKCR1.bit.EPWM4ENCLK = 0;//1; // ePWM4
SysCtrlRegs.PCLKCR1.bit.EPWM5ENCLK = 0;//1; // ePWM5
SysCtrlRegs.PCLKCR1.bit.EPWM6ENCLK = 0;//1; // ePWM6
SysCtrlRegs.PCLKCR1.bit.EPWM7ENCLK = 0;//1; // ePWM7
SysCtrlRegs.PCLKCR1.bit.EPWM8ENCLK = 0;//0;//1; // ePWM8
SysCtrlRegs.PCLKCR0.bit.HRPWMENCLK = 0;//1; // HRPWM
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;//1; // Enable TBCLK within the ePWM
SysCtrlRegs.PCLKCR1.bit.EQEP1ENCLK = 0;//1; // eQEP1
SysCtrlRegs.PCLKCR1.bit.EQEP2ENCLK = 0;//1; // eQEP2
SysCtrlRegs.PCLKCR1.bit.ECAP1ENCLK = 0;//1; // eCAP1
SysCtrlRegs.PCLKCR1.bit.ECAP2ENCLK = 1; // eCAP2
SysCtrlRegs.PCLKCR1.bit.ECAP3ENCLK = 0;//1; // eCAP3
SysCtrlRegs.PCLKCR2.bit.HRCAP1ENCLK = 0;//1; // HRCAP1
SysCtrlRegs.PCLKCR2.bit.HRCAP2ENCLK = 0;//1; // HRCAP2
SysCtrlRegs.PCLKCR2.bit.HRCAP3ENCLK = 0;//1; // HRCAP3
SysCtrlRegs.PCLKCR2.bit.HRCAP4ENCLK = 0;//1; // HRCAP4
SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1; // ADC
SysCtrlRegs.PCLKCR3.bit.COMP1ENCLK = 0;//1; // COMP1
SysCtrlRegs.PCLKCR3.bit.COMP2ENCLK = 0;//1; // COMP2
SysCtrlRegs.PCLKCR3.bit.COMP3ENCLK = 0;//1; // COMP3
SysCtrlRegs.PCLKCR3.bit.CPUTIMER0ENCLK = 1; // CPU Timer 0
SysCtrlRegs.PCLKCR3.bit.CPUTIMER1ENCLK = 1; // CPU Timer 1
SysCtrlRegs.PCLKCR3.bit.CPUTIMER2ENCLK = 1; // CPU Timer 2
SysCtrlRegs.PCLKCR3.bit.DMAENCLK = 1; // DMA
SysCtrlRegs.PCLKCR3.bit.CLA1ENCLK = 1; // CLA1
SysCtrlRegs.PCLKCR3.bit.USB0ENCLK = 0;//1; // USB0
SysCtrlRegs.PCLKCR0.bit.I2CAENCLK = 0;//1; // I2C-A
SysCtrlRegs.PCLKCR0.bit.SPIAENCLK = 0;//1; // SPI-A
SysCtrlRegs.PCLKCR0.bit.SPIBENCLK = 0;//1; // SPI-B
SysCtrlRegs.PCLKCR0.bit.SCIAENCLK = 0;//1; // SCI-A
SysCtrlRegs.PCLKCR0.bit.SCIBENCLK = 0;//1; // SCI-B
SysCtrlRegs.PCLKCR0.bit.MCBSPAENCLK = 0;//1; // McBSP-A
SysCtrlRegs.PCLKCR0.bit.ECANAENCLK=0;//1; // eCAN-A
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;//1; // Enable TBCLK within the ePWM
其中使用了T0 T1 T2 ECAP2 ADC其他外设时钟都关掉了
但是实际测试下来 CPU功耗为 110毫安左右 我把工作的频率降下来 可是功耗还是不变!!
难道TMS320F28069功耗这么大吗? 有没有办法降低功耗呢?
bluse:
回复 10#:
外部晶振是20M 内部倍频到80M 外设开了 ECAP2 T1 T2 T0 ADC 是否28069功耗就是100mA , 数据手册上没看明白数据手册上的I-DDIO (max=140mA )和I-DDA (16毫安 )是什么意思 怎么会有两个电流? 而且还挺大的?你有具体的使用经验数据吗?
TMS320F28069外部20M时钟 内部倍频到80M 外设时钟开启如下
SysCtrlRegs.PCLKCR1.bit.EPWM1ENCLK = 0;//1; // ePWM1
SysCtrlRegs.PCLKCR1.bit.EPWM2ENCLK = 0;//1; // ePWM2
SysCtrlRegs.PCLKCR1.bit.EPWM3ENCLK = 0;//1; // ePWM3
SysCtrlRegs.PCLKCR1.bit.EPWM4ENCLK = 0;//1; // ePWM4
SysCtrlRegs.PCLKCR1.bit.EPWM5ENCLK = 0;//1; // ePWM5
SysCtrlRegs.PCLKCR1.bit.EPWM6ENCLK = 0;//1; // ePWM6
SysCtrlRegs.PCLKCR1.bit.EPWM7ENCLK = 0;//1; // ePWM7
SysCtrlRegs.PCLKCR1.bit.EPWM8ENCLK = 0;//0;//1; // ePWM8
SysCtrlRegs.PCLKCR0.bit.HRPWMENCLK = 0;//1; // HRPWM
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;//1; // Enable TBCLK within the ePWM
SysCtrlRegs.PCLKCR1.bit.EQEP1ENCLK = 0;//1; // eQEP1
SysCtrlRegs.PCLKCR1.bit.EQEP2ENCLK = 0;//1; // eQEP2
SysCtrlRegs.PCLKCR1.bit.ECAP1ENCLK = 0;//1; // eCAP1
SysCtrlRegs.PCLKCR1.bit.ECAP2ENCLK = 1; // eCAP2
SysCtrlRegs.PCLKCR1.bit.ECAP3ENCLK = 0;//1; // eCAP3
SysCtrlRegs.PCLKCR2.bit.HRCAP1ENCLK = 0;//1; // HRCAP1
SysCtrlRegs.PCLKCR2.bit.HRCAP2ENCLK = 0;//1; // HRCAP2
SysCtrlRegs.PCLKCR2.bit.HRCAP3ENCLK = 0;//1; // HRCAP3
SysCtrlRegs.PCLKCR2.bit.HRCAP4ENCLK = 0;//1; // HRCAP4
SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1; // ADC
SysCtrlRegs.PCLKCR3.bit.COMP1ENCLK = 0;//1; // COMP1
SysCtrlRegs.PCLKCR3.bit.COMP2ENCLK = 0;//1; // COMP2
SysCtrlRegs.PCLKCR3.bit.COMP3ENCLK = 0;//1; // COMP3
SysCtrlRegs.PCLKCR3.bit.CPUTIMER0ENCLK = 1; // CPU Timer 0
SysCtrlRegs.PCLKCR3.bit.CPUTIMER1ENCLK = 1; // CPU Timer 1
SysCtrlRegs.PCLKCR3.bit.CPUTIMER2ENCLK = 1; // CPU Timer 2
SysCtrlRegs.PCLKCR3.bit.DMAENCLK = 1; // DMA
SysCtrlRegs.PCLKCR3.bit.CLA1ENCLK = 1; // CLA1
SysCtrlRegs.PCLKCR3.bit.USB0ENCLK = 0;//1; // USB0
SysCtrlRegs.PCLKCR0.bit.I2CAENCLK = 0;//1; // I2C-A
SysCtrlRegs.PCLKCR0.bit.SPIAENCLK = 0;//1; // SPI-A
SysCtrlRegs.PCLKCR0.bit.SPIBENCLK = 0;//1; // SPI-B
SysCtrlRegs.PCLKCR0.bit.SCIAENCLK = 0;//1; // SCI-A
SysCtrlRegs.PCLKCR0.bit.SCIBENCLK = 0;//1; // SCI-B
SysCtrlRegs.PCLKCR0.bit.MCBSPAENCLK = 0;//1; // McBSP-A
SysCtrlRegs.PCLKCR0.bit.ECANAENCLK=0;//1; // eCAN-A
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;//1; // Enable TBCLK within the ePWM
其中使用了T0 T1 T2 ECAP2 ADC其他外设时钟都关掉了
但是实际测试下来 CPU功耗为 110毫安左右 我把工作的频率降下来 可是功耗还是不变!!
难道TMS320F28069功耗这么大吗? 有没有办法降低功耗呢?
10#:
回复 bluse:
应该到不了,我倒没有经验数据,但这两个电流是不同的,一个是GPIO的最大电流,一个是模拟引脚即ADC通道和电源等的最大电流。