mattairtech / ArduinoCore-samd

This is a fork from arduino/ArduinoCore-samd on GitHub. This will be used to maintain Arduino support for SAM D|L|C (M0+ and M4F) boards including the MattairTech Xeno Mini and the MT-D21E (see https://www.mattairtech.com/). It adds support for new devices like the D51, L21, C21, and D11. It also adds new clock sources, like a high speed crystal or internal oscillator.
104 stars 43 forks source link

Power consumption too high in active mode #39

Open CSC-Olivier opened 4 years ago

CSC-Olivier commented 4 years ago

Problem: The SAMD21E17A chip uses 8mA in active mode (internal oscillator) and 9mA in active mode (with an external 32kHz crystal) The datasheet (table 37-8 page 988) state the consumption in active should be around 3mA

How to reproduce the problem: Hardware setup: bare chip with 0.1uF bypass cap on VDDIN and VDDANA connected to VCC. 0.1uF cap between VDDCORE and GND. VDDIN and VDDANA are at VCC=3V

Software: Blank sketch compiled using this core uploded with SWD using a J-Link (no bootloader). BOD33 fuse disabled USB disabled in the core menu options

CSC-Olivier commented 4 years ago

I can reduce power consumption by reducing the core CPU clock. At 8MHz, the SAMD21E17 consume only 2.2mA. But the problem remains, according to the datasheet, we should get 3mA at 48MHz. Is there some initialization in the core that can explain why the consumption is 3 times higher than it should?