完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我在睡眠模式下测量PIC32 MZ2048 EFH064的电流消耗为8毫安。数据表指示它通常应该是1.2毫安(最大7毫安)。电路是PIC32 MZ2048 EFH064,如附图中所示的最小组件。下面粘贴代码。所有GPIO都配置为具有内部下拉功能的数字输入。所有外围模块禁用(PMD)位被设置。WDT、DMT、时钟切换、故障安全时钟监视器和次级振荡器被禁用。主振荡器被启用(禁用它不影响电流消耗)。是否有人能够实现数据表中规定的断电电流?
以上来自于百度翻译 以下为原文 I measure current consumption of the PIC32MZ2048EFH064 in sleep mode to be 8 mA. The datasheet indicates it should typically be 1.2 mA (maximum 7 mA). The circuit is PIC32MZ2048EFH064 with minimum components as shown in attached schematic. The code is pasted below. All GPIO are configured as digital inputs with internal pull-down enabled. All peripherals modules disable (PMD) bits are set. WDT, DMT, Clock Switching, Fail-Safe Clock Monitor, and Secondary Oscillator are disabled. Primary oscillator is enabled (disabling it does not affect current consumption). int main() { // Disable all analogue inputs ANSELB = 0x00000000; ANSELE = 0x00000000; ANSELG = 0x00000000; // Enable all pull-downs CNPDB = 0xFFFFFFFF; CNPDC = 0xFFFFFFFF; CNPDD = 0xFFFFFFFF; CNPDE = 0xFFFFFFFF; CNPDF = 0xFFFFFFFF; CNPDG = 0xFFFFFFFF; // Disable peripherals PMD1 = 0xFFFFFFFF; PMD2 = 0xFFFFFFFF; PMD3 = 0xFFFFFFFF; PMD4 = 0xFFFFFFFF; PMD5 = 0xFFFFFFFF; PMD6 = 0xFFFFFFFF; PMD7 = 0xFFFFFFFF; // Enable sleep mode PLIB_DEVCON_SystemUnlock(DEVCON_ID_0); PLIB_OSC_OnWaitActionSet(OSC_ID_0, OSC_ON_WAIT_SLEEP); PLIB_DEVCON_SystemLock(DEVCON_ID_0); asm("WAIT"); // Main program loop while (true) { } } Has anyone been able to achieve the power down current stated in the datasheet? Attached Image(s) |
|
相关推荐
9个回答
|
|
所有未使用的引脚是否设置为输出?周围的一切都关闭了吗?板上还有其他的部件在汲取能量吗?
以上来自于百度翻译 以下为原文 Are all the unused pins set to outputs? Are all the peripherial off? Are there other components on the board that are drawing power? |
|
|
|
你似乎没有读过我的文章。要清楚的是:没有其他组件在板上,附图的OP是完整的。3.3V和GND之间的测量电阻(当板不供电时)确认没有故障。
以上来自于百度翻译 以下为原文 You don't appear to have read my post at all. To be clear: There are no other components on the board, the schematic attached to the OP is complete. The measured resistance between 3.3V and GND (when the board is not powered) confirms no faults. |
|
|
|
这些内部上拉/下是电流源/汇类型,它是大约40uA(分钟)每个引脚。
以上来自于百度翻译 以下为原文 those internal pull-up/down are current source/sink type, it's about 40uA(MIN) each pin. |
|
|
|
测量的电流消耗(8毫安)保持不变,无论输入是浮动的还是具有内部下拉功能的。当使用PIC32 MX时,我发现配置浮动GPIO作为内部拉降的输入能够实现低电流消耗;低于PU时的消耗。虽然100针设备的差值为几个UA,但LUPS还是启用了。
以上来自于百度翻译 以下为原文 The measured current consumption (8 mA) remains unchanged whether the inputs are floating or have the internal pull-downs enabled. When working with a PIC32MX, I found that configuring floating GPIO as inputs with internal pull-downs enabled achieved the lowest current consumption; lower than when pull-ups were enabled though the difference was a few uA for a 100 pin device. |
|
|
|
从数据表:我看不到你在我的帖子中提到的任何一个要点。也请注意,DeBug必须断开连接,我已经看到消耗增加了-4mA,只是我的ICD3连接,软件在发布模式下运行。
以上来自于百度翻译 以下为原文 From the Datasheet:- I don't see you addressing any of the points I've highlighted above in your post. Also note that the de-bugger must be disconnected, I've seen consumption raised by >4mA with just my ICD3 connected, software running in release mode. |
|
|
|
要清楚:很多海报都会留下很多信息。我张贴了一些常见的东西,睡眠时限问题,离开他们的岗位,是实际问题。还有一些像使用高静态电流调节器,差的质量帽等。你把你认为重要的东西发布到这个问题上。很多时候,这个问题是你看不到的地方。
以上来自于百度翻译 以下为原文 To be clear: many posters leave out a lot of information. I posted common things others with Sleep current issues leave out of their posts and are the actual issue. There are others like using a high Quiescent current regulator, poor quality cap, ect. You posted what you thought was important to the issue. And many times the issue is someplace you did not look. |
|
|
|
调试器断开连接。我已经实现了Microchip规定的测试条件中的每一个项目,以下的例外:我只对OSC1/OSC2引脚进行了测试,这些引脚要么配置为主振荡器,要么都配置为输入,而使用内部FRC。VUSB3V3连接到3.3V的轨道,而不是VSS。ND信息如何禁用Tel1缓存和预取模块。所有GPIO都配置了一个内部下拉而不是绑定到VSS的输入。我正在测量线性调节器的电流消耗。我的电阻测量证实没有旁路电容器正在下沉电流。在电路中没有其他组件。感谢所有的建议。基于PIC32 MX经验,并对上面的项目1’和‘4’进行了实验,我相当确信这些项目是不相关的。PIC32 MX文档不要求将B3V3绑定到VSS。这对PIC32 MZS来说似乎是新的。这可能是过剩电流的原因。有没有人有这样的经验?更改这个连接将是我当前板上的一个很难修改的工作。鉴于最终目标是令人尴尬的1.5毫安(典型),我正在考虑实现低功耗模式的硬件解决方案。例如,控制PIC32 MZ电源与MOSFET和外部RTC中断。
以上来自于百度翻译 以下为原文 The debugger is disconnected. I have implemented every item in Microchip's prescribed test conditions with the following exceptions:
I am measuring current consumption after a linear regulator. My resistance measurements confirm that none of the bypass capacitors are sinking the current. There are no other components in the circuit. Thank you for all the suggestions. Based on PIC32MX experience, and having experimented with variations of items '1' and '4' above, I am reasonably confident that these items are not relevant. PIC32MX documentation does not require VUSB3V3 to be tied to VSS. This seems to be new to the PIC32MZs. Perhaps this accounts for the excess current. Does anyone have specific experience with this? Changing this connection would be a difficult rework on my current board. I am close to exhausting all lines of inquiry. Given that the end goal is an embarrassing 1.5 mA (typical), I am considering implementing a hardware solution for low-power mode. For example, control PIC32MZ power with MOSFET and external RTC interrupt. |
|
|
|
然后发布您的实际代码,包括配置位。您发布的代码没有显示,例如,禁用时钟。我希望POSC/FRC按1MAWRT VUB3V3的顺序绘制,它提供HS USB PHY和输出PULUPS,所以也可以画一对MA。我的所有应用都是电池供电的(USB需要,所以VUSB3V3消耗)。然而,由于未被测量),由于睡眠中的高电流消耗(我认为1Ma太高),我不依赖睡眠模式来降低功率,最好通过禁用PSU来去除PIC的电源。RTC中断想法可能是你最好的选择。
以上来自于百度翻译 以下为原文 Then post your actual code, including config bits. The code you posted doesn't show, for example, disabling of clocks. I would expect POSC/FRC to draw on the order of 1mA. WRT VUSB3V3, it supplies the HS USB PHY & output pullups, so may also draw a couple of mA. All my applications have been battery powered (with USB required, so VUSB3V3 consumption not measured) however due to the high current draw in sleep (I would consider 1mA far too high) I don't rely on sleep mode for power down, prefering to remove power from the PIC by disabling the psu. The RTC interrupt idea is probably your best bet. |
|
|
|
这里是完整的代码,包括配置位。如果其他人在这个问题上跌跌撞撞,我就把它列入参考。我将为不使用睡眠的产品创建一个低功耗模式。
以上来自于百度翻译 以下为原文 Here is the complete code, including config bits. I'm including it for reference in case anyone else stumbles on this same issue. I will create a low-power mode for the product that does not use sleep. /*** DEVCFG0 ***/ #pragma config DEBUG = OFF #pragma config JTAGEN = OFF #pragma config ICESEL = ICS_PGx1 #pragma config TRCEN = OFF #pragma config BOOTISA = MIPS32 #pragma config FECCCON = OFF_UNLOCKED #pragma config FSLEEP = OFF #pragma config DBGPER = PG_ALL #pragma config SMCLR = MCLR_NORM #pragma config SOSCGAIN = GAIN_LEVEL_3 #pragma config SOSCBOOST = ON #pragma config POSCGAIN = GAIN_LEVEL_0 #pragma config POSCBOOST = ON #pragma config EJTAGBEN = NORMAL #pragma config CP = OFF /*** DEVCFG1 ***/ #pragma config FNOSC = SPLL #pragma config DMTINTV = WIN_127_128 #pragma config FSOSCEN = OFF #pragma config IESO = OFF #pragma config POSCMOD = HS #pragma config OSCIOFNC = OFF #pragma config FCKSM = CSECME #pragma config WDTPS = PS1048576 #pragma config WDTSPGM = STOP #pragma config FWDTEN = OFF #pragma config WINDIS = NORMAL #pragma config FWDTWINSZ = WINSZ_25 #pragma config DMTCNT = DMT31 #pragma config FDMTEN = OFF /*** DEVCFG2 ***/ #pragma config FPLLIDIV = DIV_1 #pragma config FPLLRNG = RANGE_13_26_MHZ #pragma config FPLLICLK = PLL_POSC #pragma config FPLLMULT = MUL_21 #pragma config FPLLODIV = DIV_2 #pragma config UPLLFSEL = FREQ_24MHZ /*** DEVCFG3 ***/ #pragma config USERID = 0xffff #pragma config FMIIEN = OFF #pragma config FETHIO = OFF #pragma config PGL1WAY = ON #pragma config PMDL1WAY = ON #pragma config IOL1WAY = ON #pragma config FUSBIDIO = OFF /*** BF1SEQ0 ***/ #pragma config TSEQ = 0x0000 #pragma config CSEQ = 0xffff int main() { // Disable all analogue inputs ANSELB = 0x00000000; ANSELE = 0x00000000; ANSELG = 0x00000000; // Enable all pull-downs CNPDB = 0xFFFFFFFF; CNPDC = 0xFFFFFFFF; CNPDD = 0xFFFFFFFF; CNPDE = 0xFFFFFFFF; CNPDF = 0xFFFFFFFF; CNPDG = 0xFFFFFFFF; // Disable peripherals PMD1 = 0xFFFFFFFF; PMD2 = 0xFFFFFFFF; PMD3 = 0xFFFFFFFF; PMD4 = 0xFFFFFFFF; PMD5 = 0xFFFFFFFF; PMD6 = 0xFFFFFFFF; PMD7 = 0xFFFFFFFF; // Disable all clocks except 1 and 7 PB2DIV = 0x00000000; PB3DIV = 0x00000000; PB4DIV = 0x00000000; PB5DIV = 0x00000000; PB8DIV = 0x00000000; // Enable sleep mode PLIB_DEVCON_SystemUnlock(DEVCON_ID_0); PLIB_OSC_OnWaitActionSet(OSC_ID_0, OSC_ON_WAIT_SLEEP); PLIB_DEVCON_SystemLock(DEVCON_ID_0); asm("WAIT"); // Main program loop while (true) { } } |
|
|
|
只有小组成员才能发言,加入小组>>
5192 浏览 9 评论
2011 浏览 8 评论
1936 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3183 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2238 浏览 5 评论
746浏览 1评论
633浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
517浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
644浏览 0评论
544浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-1 11:08 , Processed in 1.388096 second(s), Total 93, Slave 76 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号