请教一下,我一个终端节点,按照官网文档配置后,休眠的时候电流也有0.2ma,协议栈里面还有什么可以优化的吗
YiKai Chen:
可以說明一下你是怎樣量測到电流也有0.2ma,這個感覺是IO在漏電或是终端节点polling 造成的平均耗電
user5287842:
回复 YiKai Chen:
直接串了一个万用表,测出来的电流
Viki Shi:
不用的IO口怎么设置的?建议按照手册:
Unused I/O pins should have a defined level and not be left floating. One way to do this is to leave the pin unconnected and configure the pin as a general-purpose I/O input with pullup resistor. This is also the state of all pins during and after reset (except P1.0 and P1.1, which do not have pullup or pulldown capability). Alternatively, the pin can be configured as a general-purpose I/O output. In either case, the pin should not be connected directly to VDD or GND, in order to avoid excessive power consumption.
user5287842:
回复 Viki Shi:
没用的IO口默认不是上拉输入吗?还需要再配置吗
YiKai Chen:
回复 user5287842:
沒用的IO建議設置為TriState.
user5287842:
回复 YiKai Chen:
文档上面写的是上拉输入或者输出啊
YiKai Chen:
回复 user5287842:
我自己的專案沒用的IO是設置為TriState。另外你量測到的0.2mA有可能是polling造成,請問你的poll rate是多少?
user5287842:
回复 YiKai Chen:
你说的是data request那个吗?我改成这样了-DPOLL_RATE=0
YiKai Chen:
回复 user5287842:
-DPOLL_RATE=0就是把polling rate設置為0,也就是不做polling,所以你的功耗跟polling無關,你要檢查IO漏電了
user5287842:
回复 YiKai Chen:
好的,你的设置成三态,休眠的时候电流一般是多少ua