I try for a few days now to get the sleep current consumption to acceptable level.
We use MK20DX128VLH7 Mask 2N36B. Due to bug on this mask we have to use VLLS3 in place of planed LLS.
Still there is high sleep current a-lot more than expected and used to with kinetis parts.
I really hope there is some error in my code.
KDS is 3.0.0., Processor expert with updates and "mcuoneclipse" add-ons.
PCB is extremely basic. No external peripherals, no LDO... just battery (3.6V minus schottky drop, capacitors...), RF chip removed.
Only 32kHz RTC crystal is used.
When application is loaded and cpu goes to sleep I remove SWD (debug) connection the consumption is sometimes lower then when it wakes-up from sleep.
Now the biggest curiosity. Some parts have around 15-20uA in sleep (cca. 7 of 20 test boards) other from 70-150uA. On one board with high consumption I removed the part and soldered new on in its place and the new one had low consumption cca. 20uA.
I have attached project I use now to figure out the consumption problem.
Can someone test this on newer mask set part like 3N36B?
VLLSx modes should be fully functional in mask set 2N36B, am I wrong?
I would greatly appreciate if someone could review my PE configuration and program flow (it's only 30lines of code in main.c)!
Original Attachment has been moved to: K20_VLH7_2N36B_VLLS3.zip
Hi Isaac and Earl.
All unused pins are driven low.
We replaced IC's on problematic boards with special care on ESD safety etc.
Some new (1/8) IC's still have high consumption other down to 15uA.
15uA is acceptable but still high for basic PCB design.
I will report back when we continue work on this project.
thnx to all.
I test now with minimal project configuration.
Running from internal low speed oscillator.
Wakeup with LPTMR (clock sourced from LPO).
All pins set to output and "inactive" value. Some pins need 1 to disable FET transistor with connected "load".
And the sleep power consumption is the-same like on full application.
It doesn't matter if it's VLLS1, VLLS2 or VLLS3, the consumption stays high....
If someone want to test on their boards, set appropriate "Init. value" for chip ports to minimize current consumption.
Interestingly I test with 3 boards and two had low consumption (20uA) and one 100uA. Now i have two with 100uA consumption.
I never know what will happen after I flash the board. We have PEMicro Multilink FX ......
Just now i flashed all of them one more time and now again two of them are at 20uA in sleep and one at 100uA.
Digital inputs NOT being DRIVEN to voltage-rails usually explains 'unexpected' device current consumption, and the 'variable nature' indicates FLOATING inputs, so that the cross-conduction-current in the input structure-stack varies based on the exact 'between rails' voltage the pin happens to find.
I already tested your basic project into my TWR-K20D72M board (1N36B mask) and current consumption is up to 482uA, however, when output pins configuration is omitted (in Cpu.c file, PE_low_level_init function i commented all BitsIoLddx_Init calls) current consumption does lower up to 1.55uA which is the range specified in K20's datasheet.
Could you please validate this consumption?
Have a nice day!