Hi , I am new to wsn and I am wondering if there is a way to measure the energy consumption of the atmel samr21_xpro .Thank you in advance!
and welcome to RIOT! This board has a jumper on it’s current monitor header pins (next to the user programmable button). You can replace the jumper by an ammeter and measure the current. Compare the boards user guide Best, Peter
First of all I want to thank you for your fast reply.I want to measure the energy consumption from the board using software without external tools as an ammeter.
I’d love to have such possibility, but from my knowledge there is no coulomb counter (or similar) on that board or on any common hardware. If you find a way, please let me know !
@Illias, the current monitor header pins are the only way I know to measure the current consumption. If you see a better way to do that, It would be great to try it, let us know.
if you decide to measure the energy consumption through those external pins, keep in mind, that you are measuring the consumption of the complete board - not only the MCU+radio. Last time I tried, I always got something around 100mA. This is fairly high for this kind of board (the STM32F4discovery was around ~15mA for the full board). Not sure where this high consumption comes from - but maybe you can measure your board and share your results with us?
@Hauke, we add some results around 1,62mA some months ago 
Thank you all for your replies!!!
@Hauke Is there a way to measure at least MCU+radio with software without using any external tool?
Thank you in advance!
Did anyone tried Battery gas gauge: Linear Technology LTC4150 Coulomb Counter on R21 board or at any other board?
Is it possible to guide me on porting it to r21?