Tag Archives: SAMD20

The SAM L21 pushes the boundaries of low power MCUs

Atmel just released a new Atmel | SMART ARM-based microcontroller. While the SAM L21 has the performance of a Cortex M0+ core, it also packs a number of ultra-low-power features. The MCU can even do touch sensing for buttons, sliders, and wheels while using extremity low power. One key component is there are five distinct power domains inside the chip. Most lower-power ARM chips, including Atmel’s, simply disable the clock to the various sections. The SAM L21 turns off power to the sections, hence no leakage currents in the thousands of transistors in that section.


The numbers are impressive even without the power cycling. The SAM L21 uses 40uA/MHz, less than half that of the SAM D20, which uses 103uA/MHz. For static power with RAM retention with RTC, the SAM L21 is 4 times better, using 0.9uA instead of 3.8uA like the SAM D20.

The chip is being evaluated against the ULPBench performance metric. Our early testing shows the SAM L21 to be lower power than any of our competitors’ M0+ class chips.

Now, understand that power consumption is no trivial spec and you have to realize “it depends on what the meaning of the word ‘power’ is.” My buddy Dave Mathis is doing a sensor monitor system that is asleep 99.99% of the time, waking up once a day to take a measurement and send it wirelessly to a host. For that you want that low static power consumption. Prior to the SAM L21, that meant that you would look at our AVR 8-bit XMEGA parts. What is important to this application is static power, which is really leakage current in the transistors that make up the CMOS gates. An XMEGA not only has fewer transistors than any ARM part, they are made on a bigger process geometry, which results in less leakage.

What is truly revolutionary about the SAM L21 is that it provides you with 32-bit performance, but since it turns off power to unneeded sections of the chip, there is no leakage current in those sections. The XMEGA is still better for static power, with only 100nA of leakage in RAM retention mode, but it is still an 8-bit chip. If you want to do Internet of things (IoT) where you need a TCP/IP stack, or if you need to do some number crunching, you need an ARM-class 32-bit chip, and that is what the SAM L21 is.

Application engineer extraordinaire Bob Martin explained to me why you might save total power with a more power-hungry chip. He explained that is the deal with sensor fusion hubs. Most hubs have an IMU (inertial measurement unit), a 3-axis accelerometer, and a magnetometer. Now most of these talk SPI (serial peripheral interface) so you can easily read them out with an 8-bit AVR chip. And, Atmel makes the ATWINC1500 radio chip that has the TCP/IP stack inside, so an AVR can talk to it and out the door the data will go, all the way to the Internet. But realize that radio chips use way more power than microcontrollers, even fast big ones. A radio chip needs power to transmit, and that means they take milliamperes of current during transmit. So this is how a sensor fusion hub saves power. Rather than use the radio chip to send the data from each sensor, the ARM-based chip does the math and pre-processing to combine the raw data from all three sensors and then represent the result as a simple chunk of data representing its position in space. Then the radio chip has to send much less data. By using a more powerful microcontroller, you save total power since you reduce the on-time of the radio chip.

My buddy at Google tells me a fellow there has installed Linux on an AVR. He swears it even has a file system. He also notes that it takes a couple hours to boot into a GUI. So that is the other tricky power tradeoff. If you have to leave a little chip slogging away for a long time, you might be better off with a 32-bit ARM-based chip that can wake up, do its thing, and go back to sleep. The same is true for your external peripheral chips. Nick Gray, an analog application engineer points out you might not want the lowest power ADC (analog to digital converter) chip in your design if you are only reading it occasionally. He says what you really care about is how fast the chip wakes up and can take good data. If a fast high-current chip wakes up 10 times faster but uses twice the power, it will still use less energy, less charge, than the slower chip.

Firmware engineers need to be much more familiar with the hardware than Windows or web programmers. My buddy Wayne Yamaguchi has made an LED flasher that lasts for half a year on a tiny 1220 coin cell. You can spend 128 dollars on these flashing cufflinks, but the battery only lasts for 24 hours. What Wayne does is take the AVRtiny10 out of active mode and uses the RTC to wake it up. That is why his flasher lasts 182 times longer. Then again, Wayne has an EE and used to work at HP/Agilent. He studies the Atmel datasheets and then really gets the best out of them with his programming techniques.


Wayne Yamaguchi shows off his blinkie board that uses an ATtiny10 in SOT-6 package.                                                       It runs for 6 months on a 1220 coin cell.

This is the beauty of the SAM L21. If you are a hardware person like me, you know that cycling power to CMOS chips can cause latchup and other problems. That is why it is hard to turn off sections of a chip like the L21 does, rather than just stop the clock. Atmel engineers have done all the hard work to make sure nothing blows up or latches, and they provided the supervisory logic so that all the power cycling is automatic when you are doing touch sensing. I am confident that there is no better chip to do touch sensing for battery powered gizmos that need the processing power for Internet of things applications.

Just realize there is no simple number or even a benchmark that will tell you the power consumption of your particular applications. I can’t find it again, but I recently read an editorial blog where the fellow wanted someone to take all the microcontrollers from all the manufacturers and “just figure out the lowest power one”. Well, that is impossible and the simplistic thinking we expect from bosses, not fellow engineers. There is no one number, there is no one chip that you can simply say is the “lowest power.” It all depends what you are doing with the chip and firmware you write for it. My pal Harry Holt is an application engineer over at Analog Devices. He is an op-amp expert and op amps have 30 or 40 different specs. Harry has a great line he tells the “newbies” to engineering. He says: “There are only three important specs to an op amp.” Harry’s victim gets excited and says, “What are they; tell me, what are the three specs?” Harry smiles and says “That depends on your application.”

Interested in learning more about the SAM L21? Stay tuned for more details. Meanwhile, you can read the latest blog pieces on the ARM-based MCU here.

The new Atmel-ICE debugger is here

I ordered the new Atmel ICE debugger as soon as it appeared on the company store. I see there is still stock so feel free to put in an order with us or your favorite distributor. Don’t get this new one confused with our JTAGICE3,  sometimes called JTAGICE markIII or mk3. It looks similar, but this new one has two debugging connectors. One is for the AVR microcontrollers, and one is for ARM MCU devices. There is a nice slide-show and explanation on our Norway site.


The new Atmel-ICE is white and has two connectors for debugging. The old JTAGICE3 (inset) is silver and only has one connector, although you can upgrade the firmware so it can debug SAM D20 ARM-based MCUs.

Best yet, just like we lowered the priced between the JTAGICE2 and JTAGICE3, we lowered it again for the Atmel ICE. You can get the fancy high-zoot version for 85 bucks. It has the pretty box and all the cables. Then there is a stripper version with just one debug cable for $49. Finally, you can get a bare-board version with no case or cables for a measly $32. This is a great deal when you think that a JTAGICE2 was $399.


This new Atmel-ICE replaces both the Dragon and the JTAGICE3. The only other ARV debugger you might need is the AVRONE! debugger that has trace capability. It’s 600 bucks, but that is worth every penny if you are trying to figure out where your program went or how it entered a subroutine or interrupt vector.

For the “big iron” ARM MPU (microprocessor units) with external memory you can use the SAM ICE. The SAM-ICE is in our store for 100 dollars. This works with Atmel’s MPU chips like the ARM Cortex A5-based chips like the SAMA5D series, and the ARM9-based SAM9x parts.

I unboxed my new Atmel-ICE today, here are the pictures:


The box has a Norse warrior on it, as tribute to the brilliant Norwegian engineers that invented the AVR chip.


Open the box and you see the Atmel-ICE on the left, safely snuggles in anti-static foam, and a box on the right with the three cables and breakout PCB.


Here is a close-up of the debug connectors. Identical, but the one on the right is for AVR and the one on the left is for ARM-based MCUs.


The Atmel ICE uses the micro USB connector. The two more expensive versions come with the cable, the bare PCB does not.


To keep costs down we didn’t paint the logo on, you can see it is nicely inset, as are the “AVR” and “SAM” indicators to tell you which debug connector is which. Check out how nice and small the unit is. This is another improvement over the JTAGICE2, and a real benefit on a crowded desk or lab bench.


Here is the cables that come in the 85-dollar unit. You also get the USB cable. Note the one cable comes with that cool breakout board.


The breakout board has a silkscreen on both sides to help you figure out what it plugs into.

Two Atmel chips in the new Microsoft Surface 2 tablet

Crack Atmel sales engineer Stuart Cording brought to my attention a teardown of the new Microsoft Surface 2 tablet. While it looks very much like the legacy Surface RT, it is a complete redesign. There is another nice teardown over from my pals at iFixit.


The Surface 2 internals are a complete redesign from the Surface RT (courtesy iFixit).

I was delighted to see that the Surface 2 contains two Atmel chips. There is one of our high-performance touch controller chips, the mXT1664S S-series, and our 32-bit AVR chip, the AT32UC3L0256. I have a soft-spot for the AVR 232-bit UC3 chip. It’s got all the cool peripherals and low power from the XMEGA family, but it is a 32 bit chip. I know everybody loves ARM chips and we make a whole bunch of ARM architecture chips, including the SAM D20, but UC3 is a pretty sweet little chip itself, as evidenced by Microsoft’s selection of it in this cost-sensitive consumer application.

The S-series touch chip is a capacitive touch controller chip that provides high performance. It is based on the 32-bit UC3 AVR part, so if you want to write assembly code, you only have to learn once instruction set to use both chips that Microsoft picked.  Look to see our T-series chips start to show up on tablets. It raised the performance bar even higher, with precise 0.2mm stylus accuracy, as well as hover and gloved-hand multi touch. We did a little video demo and I asked the engineer if it could do multi-touch with one glove and one stylus and he proved it could.

So keep an eye out for more Atmel touch hardware in tablets, phones, and car dashboards. We had one engineer tell us that while we did have superior hardware, our touch algorithms were also far superior. So you can image how good you can make your display with good hardware and firmware from Atmel.