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.
103 stars 43 forks source link

Low Power Mode #47

Open nunomiguelferreira opened 2 years ago

nunomiguelferreira commented 2 years ago

Hello and first of all thank you for adding support to the G17 series in arduino!

I have been trying to port some code from the usual SAMD21G18A-AU to the SAMD21G17 and everything seems to be working fine (at least for now, we haven't gone deeper into porting some of the spi libraries and such).

All of this in a custom PCB.

The main issue is that sleep power consumption is way higher with this board definition (SAMD21G17) than with something like SAMD21G18A-AU using the Feather M0 bootloader.

Right now with your board definition I'm getting 270uA with the same code that in a SAMD21G18 using Feather M0 that would get me something like 8uA sleep.

The code to put the processor to sleep is using the sleepdeep mask, disabling the usb and disabling systick interrupt.

Is the power difference due to something being initialized in your board definition? I would like to be able to use the G17 in our designs, if we could get the same low power consumption.

Thank you for your time.