Tag Archives: Atmel Software Framework

1,400 new example projects in IAR Systems’ dev tool support entire Atmel MCU and MPU lineup

We have just announced the extension of our partnership with IAR Systems have to include over 1,400 new example projects in IAR Systems’ development tools to support Atmel’s entire portfolio of world-class MCUs and MPUs.

Atmel_AVR

Designers using both Atmel AVR and Atmel | SMART family can now leverage IAR Embedded Workbench, the leading C/C++ compiler and debugger toolchain, with new example projects to bring their products faster to market. With all the information available to a developer at the start of a project, including over 1,400 new examples from the Atmel Software Framework (ASF) for reference designs across a broad range of applications and Atmel’s Xplained Pro family of evaluation boards, this significantly increases developers’ productivity.

ASF is a large library of free source code for Atmel | SMART ARM and highly-popular AVR devices. This framework minimizes much of the low-level configuration and design required for projects to get off the ground, by providing hardware abstraction with consistent APIs, as well as high-value middleware components designed for evaluation, prototyping, design, and production phases.

arm

“We are committed to providing simple, yet sophisticated tools for our designers’ complex development,” said Steve Pancoast, Atmel Vice President of Development Software and Tools. “Since the introduction of our AVRs in the early 90s, IAR Systems has always been an important partner for us, providing world class tools to our most demanding users. The integration of our reference application examples into IAR Embedded Workbench will reduce overall time-to-market for developers, enabling them to bring products faster to market.”

avr_chip_small

“High-performance development tools are critical for success in today’s advanced embedded systems designs, specifically for the Internet of Things and connectivity markets,” added Stefan Skarin, IAR Systems CEO. “IAR Systems’ position is unique in that we are the only commercial vendor able to provide this, as well as our world class support, across Atmel’s entire range of microcontroller architectures.”

28 new application notes for Atmel | SMART SAM4S devices

Atmel engineers recently published 28 application notes for the company’s comprehensive Atmel | SMART SAM4S devices. Based on the powerful ARM Cortex-M4 core, this Atmel | SMART product line extends our Cortex-M portfolio to offer:

  • Increased performance and power efficiency
  • Higher memory densities: up to 2MB of Flash and 160KB of SRAM
  • And a rich peripheral set for connectivity, system control and analog interfacing

According to an Atmel engineering rep, the application notes target the use of peripheral modules and are based on drivers already available in the ASF (Atmel Software Framework).

“The application notes highlight the availability of the drivers and offers the reader relevant details about the API (application programming interface),” the rep told Bits & Pieces.

“This significant increase in the number of application notes for the SAM4 series gives the engineer a better starting point for using the products. More specifically, the new application notes cover the Atmel SAM4S/SD, SAM4N, SAM4L/LS, SAM4E, and to some extent, also the SAM4C and SAM G51/53 families.”

atmel_SMART_Microsite_980x352

So without further ado, the following app notes are now available from the Atmel website in PDF format:

Atmel expands SAM D Cortex M0+ MCU portfolio

Atmel has expanded its low-power ARM Cortex M0+-based MCU portfolio with three new families: the SAM D21, D10 and D11. These entry-level, low-power MCUs are packed with high-end features including Atmel’s Event System, SERCOM module, peripheral touch controller and a full-speed USB interface.

“As more devices are becoming smarter and connected in this era of the Internet of Things (IoT), designers are looking for MCUs with additional connectivity and communication options to scale their applications in the consumer, industrial and medical markets,” explained Patrick Sullivan, Vice President of Marketing, Microcontroller Business Unit, Atmel Corporation.

“Atmel’s new SAM D21, D10 and  D11 families of Cortex M0+-based MCUs deliver low-power consumption, connectivity and small footprint, providing designers just the right price-to-performance ratio. These new families expand the company’s growing line of Atmel Smart microcontrollers with new pin and memory combinations, along with new features such as DMA and crystal-less USB.”

samd2tools
As we’ve previously discussed on Bits & Pieces, Atmel’s SAM D portfolio is architected beyond the core, leveraging over two decades of MCU experience to create unique, connected peripherals that are easy-to-use, while providing scalability and performance. Indeed, to help simplify the design process and eliminate the need for additional components, Atmel’s new SAM D lineup integrates additional functionality, including full-speed crystal-less USB, DMA, I2S, timers/counters for control applications, along with several other new features. Atmel’s SAM D devices are also code- and pin-compatible making it easy for designers to migrate up and down the family.

“Atmel’s expanded portfolio of low-power SAM D family ARM Cortex-M0+-based devices enables more designers to deliver smart devices in this increasingly connected world,” said Noel Hurley, Deputy General Manager, CPU Group, ARM.

“The ARM Cortex-M0+ processor is a highly area- and energy-efficient core which enables partners, such as Atmel, to provide the right peripheral set, intelligence, communication and memory for their customers’ needs.”

Key  SAM D21 features include:

  • 48MHz operation
2.14 Coremark/MHz
  • Single-cycle IO access
  • 
6- to 12-channel Event System
  • 
6- to 12-channel DMA
  • Up to six SERCOM modules configurable as UART/USART, SPI, I2C
  • 12Mbps USB 2.0 device with an embedded host and device
  • 
Two-channel I2S with 96MHz fractional PLL for audio streaming
  • Up to five 16-bit timers, up to three 16-bit times optimized for control applications
  • Peripheral touch controller supports up to 256 touch channels for capacitive touch buttons, sliders, wheels and proximity sensing
  • 
Down to 70uA/MHz in active mode
  • 4uA RAM retention
  • Real-time clock and calendar
  • 
Option to choose between internal and external oscillators, on-the-fly clock switching
  • 
Sleepwalking

To help accelerate the design process, the $39 SAM D21 Xplained Pro is equipped with an embedded debugger/programmer and offers support for a wide range of compatible extensions boards. Standalone programmer debugger solutions supporting the SAM D family are also available from both Atmel and third parties, with the Atmel SAM D MCUs fully supported by Atmel Studio and Atmel Software Framework.

The SAM D21 is the first family in this expanded portfolio, and samples and tools are available today with volume production in May 2014. The SAM D21 is offered in 32KB to 256KB of Flash and in 32-, 48- and 64-pin packages. Meanwhile, the SAM D10 and D11 families will be available in 14- and 20-pin SOIC and 24-pin QFN packages with up to 16KB of Flash. Both memory options feature 4KB of SRAM. All package options minimize the number of power pins to maximize the amount of IO available for the application. Engineering samples and tools are slated to go live in Q2 2014.

Video: Building a GPS tracker with Atmel’s SAM D20 MCU



A GPS tracking unit uses the Global Positioning System to determine and record the precise location of a vehicle, device or individual. Key design requirements for a GPS tracker include a small form factor, low power consumption and flexible connectivity options.

Atmel’s versatile SAM D20 ARM Cortex-M0+ based microcontroller (MCU) can be used to power such a device, taking all of the above-mentioned design requirements into account.

Indeed, the SAM D20 MCU – embedded with serial communication modules (SERCOM) and low power consumption – provides the flexibility, connectivity and low power required for GPS tracker applications.

In terms of low power consumption, the SAM D20 boasts <150µA/MHz in active (CoreMark) and <2µA with RTC and full RAM retention. Meanwhile, the peripheral event system and intelligent peripherals with Atmel SleepWalking technology further reduces CPU activity and power sipping.

It should also be noted that the SAM D20 MCU offers design engineers 6 highly flexible serial communication modules (SERCOM), each configurable to operate as USART, I2C and SPI – thereby facilitating easy and flexible connection to external sensors, memories, PCs and wireless modules.

Atmel supports a wide range of dev tools and software, including FreeRTOS, Atmel Studio 6 (free IDE with GCC compiler), Atmel Software Framework (free SW libraries of production ready source code), Atmel Gallery (open to extensions) and the SAM D20 Xplained Pro Kit which is packaged with programmer and debugger, as well as connectors for expansion wings.

Interested in learning more? You can check out Atmel’s SAM D20 GPS tracker reference design here.

Electronics Weekly talks Atmel Studio 6

Atmel’s Studio 6 – which supports a wide range of ARM Cortex-M and AVR microcontrollers – allows applications to be written in C/C++ or assembly code. As Jonathan Page of MSC Gleichmann notes in a recent Electronics Weekly article posted by Richard Wilson, Atmel’s IDE facilitates a “top-down design approach” for embedded systems development.

“As a result it can avoid the need to rewrite significant portions of the code for each port to a different MCU variant or architecture,” Page explains. “With Atmel’s Software Framework (ASF), functions are implemented using a common API that abstracts away the device-specific features to maximize the portability of application-level code. This allows code developed for one target MCU to be recompiled for a new target device.”

More specifically, ASF utilizes a layered architecture with four primary categories: component, service, peripheral and board. The starting point in the ASF design process is at the top with the user application.

“This normally interfaces directly to the component and service modules unless the application needs direct access to any low-level device functions provided by the peripheral and board layers, [as] the service layer takes care of all the MCU’s internal hardware features,” Page continues. “Standardization is key to making ASF easy to use, meaning that modules operate in a consistent way using API calls like module_start(…) and module_stop(…).”

In this way, says Page, ASF enables common code development for 8-bit and 32-bit targets, providing not only a standard software library of functions and peripheral drivers but also enabling third party code libraries and associated tools.

“For example, Atmel Gallery provides a moderated App Store feature for Atmel Studio 6.0 extensions that allows access to free, evaluation and paid-for content from Atmel-certified third party development partners,” Page points out. “Typically up to 50% of the code requirements for a new project can be realized from these libraries, to say nothing of the savings that can be achieved when retargeting an application to another MCU.”

Software frameworks, once the domain of enterprise computing, are now clearly delivering productivity and efficiency benefits in embedded applications.

“The concerns of conservative developers, previously reluctant to move beyond the comfort of familiar IDE tools, can be finally been allayed with a software framework providing a true top-down design solution,” Page adds. “This approach achieves all the benefits of hardware abstraction and design portability across a wide range of target devices while losing none of the performance advantages.”

The full text of the Electronics Weekly article is available here.

AVR ATtiny10 runs LED blinker for 6 months

Check out our new AVR site. In celebration, I want to tell you about a neat project. My buddy Wayne Yamaguchi had a whole bunch of tiny coin cells left over from a project. So he whipped up a little AVR blinker using an AVR ATtiny10. The one he gave me flashes every two seconds and is quite bright. Wayne’s design intent was to put this inside a phosphor-coated globe and have a UV LED charge up the phosphors every few seconds. For this round he is just using a white LED, but you can see “UV” on the silkscreen. Wayne has done some quick calculations and it looks like if you slow it down to one 3mA flash every 8 seconds it should last for 6 months. Wayne’s trick it to take the AVR out of active mode and put it to sleep, and use the Watch Dog Timer to wake it up, flash the LED and then go back to sleep. Wayne describes the ATtiny10 project here.

ATtiny10-blinker_Yamaguchi_finger

This flasher works 6 months off a CR1220 lithium cell. Using the ATtiny watchdog timer is the secret to such miniscule power consumption.

It’s interesting to note that Wayne started out with a MCU from an Atmel competitor and found it unsuitable. As many other friends have noted about these other MCUs, Wayne said, “…a lot more coding had to be done to get the job accomplished.” He also ran into limitations where he had to do a work-around in the competitor’s chip. Another friend has commented that competing MCUs can often do one thing well, but when it needs to do two tasks, even simple ones, there are real headaches. That is why they love AVR chips. AVRs were “invented” as a complete modern architecture. Once you know one chip, it’s easy to move around to others in the AVR family, even the AVR 32-bit chips.

The only reason Wayne did not start with the AVR is that he thought he could not keep his obsolete Studio 4 install, which he knows and trusts, and still program the ATtiny10. I asked around, and my Atmel pals told me that everything Wayne would need is in the Atmel Software Framework (ASF). Sure enough that lead Wayne to a solution, and he had his ATtiny10s working under Studio 4. I kept telling Wayne to just upgrade to Studio 6, which will let you program AVR-32 and our ARM-based MCUs as well as all the 8-bit AVRs. Wayne did not want to risk changing environments, since he has several existing products that he changes and customizes and supports with Studio 4. My friends say the answer there is to just run virtual computers with VM Ware or Virtual Box. You can have Studio 4 on one Windows install and Studio 6 on another. Or you can set restore points and go back and forth between the two Studios on one install.

ATtiny10-blinker_Yamaguchi_prototype

Wayne Yamaguchi uses toner-transfer and a homemade acid bath to make prototypes in an hour.

Another interesting thing in Wayne’s blog linked above is a picture he has of the prototype. At first blush it looks like he used a router like a LPKF machine to do the board. But if you look closely, you can see some un-etched copper at the edges. Wayne uses toner transfer and a ferric chloride tank to make his own PCBs in a couple hours. The reason they look like routed boards is that Wayne is smart enough to generate the Gerbers this way so that he uses the minimum amount of ferric chloride to etch the copper. Why etch off big areas if you don’ have to? He outlines this technique in an article about prototyping I wrote a few years ago.

Now wayne did the prototype raw-copper PCB in a day to get started, but he wanted a nicer board for development (see pics and below). For this he turned to OSH Park up in Oregon. He panalized the boards as you can see from the break-away tabs on the edge. The bottom line is each PCB ended up costing him a dollar. I think he was out 20 bucks for the order and got 18 boards. OSH Park collects orders for small lots and puts them all onto a 18×24 panel used in the PCB fab industry. I like the looks of the boards since you get a silkscreen and soldermask. Don’t think, “Its just a prototype, I don’t need a silk or soldermask.” It’s you the one soldering on the board and a silkscreen tells you what goes where. It’s you re-soldering stuff and hand-soldering stuff and the soldermask is a blessing, especially with tiny parts. You want your prototype to be as close to production as possible. OSH Park panelizes two-layer boards every other day and gets a four-layer panel together every four days. You might wait a bit, but I have heard of several happy customers. For small boards like the Blinkie, they make great sense. For anything more serious I will stick with Proto-Express, right here in Silicon Valley. They do 4-mil spacing, can do 24oz copper (not at the same time!) and once your board is perfect, they have a partner in China to do high-volume for cheap. Three standard 2-layer boards in 4 days for about $90 and three 4-layer boards for $150 or so. And that is silk both sides if I remember right.

In addition to the info on his blog post linked above, Wayne sent me an email with the information about the flasher. He uses Evernote to store his notes as he does a project, so below are his notes to himself. I put in current Digi-Key pricing.

Wayne-Yamaguchi_Blinkie-LED-flasher

Wayne Yamaguchi shows the Blinkie flasher he designed.

Wayne did this project a couple months ago. What was interesting was how much longer the flasher ran compared to his calculations. We are not sure if this is because the batteries really have more energy when you discharge them this way, or maybe there is some other factor we don’t understand. It’s good news nevertheless. I can tell you the flasher he gave me a couple months ago is still flashing every 2 seconds. Here are Wayne’s notes:

CR2016, CR2032 Battery Info UV Blinker

2016 – 90mAH

2032 – 240mAH

Compute the average current if LED is pulsed 1 sec every 10 minutes.

1 minute = 60 seconds, 10 minutes = 600 seconds.

1 out of 600.  0.17% duty cycle.

If the LED current is 10mA then average is 17uA.

Attiny10 Power down supply current @3V is 4.5uA.

Attiny10 pricing (Sept 17, 2013):

All prices are in US dollars.
Digi-Key Part Number ATTINY10-TSHRCT-ND Price Break Unit Price Extended Price
Quantity Available Digi-Key Stock: 21,464

1

0.69

0.69

Can ship immediately

25

0.576

14.4

Manufacturer Atmel

100

0.464

46.4

1,000

0.4256

425.6

Manufacturer Part Number ATTINY10-TSHR
Description IC MCU 8BIT 1KB FLASH SOT23
Lead Free Status / RoHS Status Lead free / RoHS Compliant

CR1220 battery Energizer Specifications.  Typical Capacity 40mA/Hr.  down to 2V.

$0.90 each at Digi-Key (Panasonic)

The Nichia 310 in the open bag measure 3mA @3V.

Watch Dog Timer table (from ATtiny10 full datasheet):

ATtiny10_WDT_prescale

CR1220 UV Blinker Board as rendered by OSH Park.

Yamaguchi_CR1220_PCB

Here is the PCB layout for the CR1220 battery Blinkie

 Using 3mA for LED current and 40mA/hr battery capacity gives these run-times:

Delay

tiny10current

average LED current

Estimated Run Time

1 sec

4.5uA

30uA

1,159hrs – 48.3days (~1.61 mos)

2 sec

4.5uA

15uA

2,051hrs – 85.47days (~2.84 mos)

4 sec

4.5uA

7.5uA

3,333hrs – 139 days (~4.62 mos)

8 sec

4.5uA

3.75uA

4,848hrs – 202 days  (~6 mos)

0.25 sec

4.5uA

120uA

240hrs – 10.04 days

0.125 sec

4.5uA

240uA

163.6hrs – 6.82 days

64mS

4.5uA

480uA

82hrs – 3.4 days

CR2016 (20mm lithium) UV Blinker Board as rendered by OSH Park.

Yamaguchi_CR2016_PCB

Here is a PCB layout for the Blinkie using the larger CR2016 battery.

Note to self: It appears that the ISPmk2 (in-circuit programmer) does program at 3V or other voltages.  The error message during programming is verification failed.  But, it appears to be programmed correct.

As a side note, future blinkies should have the LED driven from the free pin PB2.

Run-time test: 64ms sec Blinkie.  1220 battery.

6/22/2013 2.975v

6/26/2013 – 2.750V 6:16   (Should have ended today)

6/27/2013 – 2.736V 10:08am

6/28/2013 – 2.728V 2:06pm

7/3/2013 – 2.43V 9:57am

7/4/2013 – no LED.  Could be still running, but, LED is not visible.

Wayne-Yamaguchi_Francis-Lau_Blinkie-LED-flasher

Wayne Yamaguchi (L) explains the LED flasher held by crack protégé Francis Lau. Lunch was at the Pho Kim restaurant in San Jose.

ATtiny10-blinker_Yamaguchi_flash

It took a few tries, but I finally caught the Blinkie flashing when I snapped the picture.

-30-

LED power management with Atmel’s XMega

LED lighting power management typically comprises power conversion, constant current regulation and fault handling. Key design considerations of LED power management include high integration capabilities, small form factor, energy efficiency, high temperature operation and support for a variety of standard lighting communication protocols.

atmelxmegalightingmanagement

“That is exactly why Atmel’s XMEGA E is highly integrated to support multiple LED driver topologies, all while leaving CPU resources for additional application functionalities,” an Atmel engineering rep told Bits & Pieces. “Plus, we offer a small form factor and dual high-speed 40ns analog comparators for current regulation, with multiple high speed 128MHz timers allowing generation of fast PWM.”

The XMEGA E also boasts dual digital to analog converters for peak current management, asynchronous event system for ultra-fast response and control loops, with a custom logic (XCL) block removing external logic components.

“In terms of energy efficiency, the XMEGA E, with its rich analog peripheral features, is capable of running a complicated power control algorithm (e.g. PFC) to achieve high power efficiency,” the engineering rep continued. “Plus, the XMEGA E offers ultra low power consumption as low as 100uA/MHz in active mode and 100nA in RTC/RAM retention. Last, but certainly not least, the XMEGA E qualifies for high temperatures at 105C and 125C.”

Atmel also offers support for multiple lighting communication protocols, such as DALI via the XCL block in XMEGA E (hardware), along with DMX, LWmesh, and interface to PLC, ZigBee Light Link, ZigBee Home Automation and other wireless protocols (software). In addition, developers have easy access to Atmel Studio 6.0, Atmel Software Framework and Atmel Gallery.

Want to learn more about designing LED power management platforms with Atmel’s XMega? Be sure to check out Atmel’s extensive lighting portfolio here.