Tag Archives: RtC

Secured SAMA5D4 for industrial, fitness or IoT display


To target applications like home automation, surveillance camera, control panels for security, or industrial and residential gateways, high DMIPS computing is not enough.


The new SAMA5D4 expands the Atmel | SMART Cortex-A5-based family, adding a 720p resolution hardware video decoder to target Human Machine Interface (HMI), control panel and IoT applications when high performance display capability is required. Cortex-A5 offers raw performance of 945 DMIPS (@ 600 MHz) completed by ARM NEON 128-bit SIMD (single instruction, multiple data) DSP architecture extension. To target applications like home automation, surveillance camera, control panels for security, or industrial and residential gateways, high DMIPS computing is not enough. In order to really make a difference, on top of the hardware’s dedicated video decoder (H264, VP8, MPEG4), you need the most complete set of security features.

Life-Fitness-F3-Folding-Treadmill-with-GO-Console-2_681x800

Whether for home automation purpose or industrial HMI, you want your system to be safeguarded from hackers, and protect your investment against counterfeiting. You have the option to select 16-b DDR2 interface, or 32-b if you need better performance, but security is no longer just an option. Designing with Atmel | SMART SAMA5D4 will guarantee secure boot, including ARM Trust Zone, encrypted DDR bus, tamper detection pins and secure data storage. This MPU also integrates hardware encryption engines supporting AES (Advanced Encryption Standard)/3DES (Triple Data Encryption Standard), RSA (Rivest-Shamir-Adleman), ECC (Elliptic Curves Cryptography), as well as SHA (Secure Hash Algorithm) and TRNG (True Random Number Generator).

If you design fitness equipment, such as treadmills and exercise machines, you may be more sensitive to connectivity and user interface functions than to security elements — even if it’s important to feel safe in respect with counterfeiting. Connectivity includes gigabit and 10/100 Ethernet and up to two High-Speed USB ports (configurable as two hosts or one host and one device port) and one High Speed Inter-Chip Interface (HSIC) port, several SDIO/SD/MMC, dual CAN, etc. Because the SAMA5D4 is intended to support industrial, consumer or IoT applications requiring efficient display capabilities, it integrates LCD controllers with a graphics accelerator, resistive touchscreen controller, camera interface and the aforementioned 720p 30fps video decoder.

hmi-panels-sama5d4-atmel-processor

The MCU market is highly competitive, especially when you consider that most of the products are developed around the same ARM-based family of cores (from the Cortex-M to Cortex-A5 series). Performance is an important differentiation factor, and the SAMA5D4 is the highest performing MPUs in the Atmel ARM Cortex-A5 based MPU family, offering up to 945 DMIPS (@ 600 MHz) completed by DSP extension ARM NEON 128-bit SIMD (single instruction, multiple data). Using safety and security on top of performance to augment differentiation is certainly an efficient architecture choice. As you can see in the block diagram below, the part features the ARM TrustZone system-wide approach to security, completed by advanced security features to protect the application software from counterfeiting, like encrypted DDR bus, tamper detection pins and secure data storage. But that’s not enough. Fortunately, this microprocessor integrates hardware encryption engines supporting AES/3DES, RSA, ECC, as well as SHA and TRNG.

The SAMA5 series targets industrial or fitness applications where safety is a key differentiating factor. If security helps protecting the software asset and makes the system robust against hacking, safety directly protects the user. The user can be the woman on the treadmill, or the various machines connected to the display that SAMA5 MCU pilots. This series is equipped with functions that ease the implementation of safety standards like IEC61508, including a main crystal oscillator clock with failure detector, POR (power-on reset), independent watchdog timers, write protection register, etc.

Atmel-SMART-SAMA5D4-ARM-Cortex-MPU-AtmelThe SAMA5D4 is a medium-heavier processor and well suited for IoT, control panels, HMI, and the like, differentiating from other Atmel MCUs by the means of performance and security (not to mention, safety). The ARM Cortex-A5 based device delivers up to 945 DMIPS when running at 600 MHz, completed by DSP architecture extension ARM NEON 128-bit SIMD. The most important factor that sets the SAMA5D4 apart from the rest is probably its implemented security capabilities. These will protect OEM software investments from counterfeiting, user privacy against hacking, and its safety features make the SAMA5D4 ideal for industrial, fitness or IoT applications.


This post has been republished with permission from SemiWiki.com, where Eric Esteve is a principle blogger as well as one of the four founding members of the site. This blog first appeared on SemiWiki on October 6, 2015.

The CryptoCape is the BeagleBone’s first dedicated security daughterboard


The CryptoCape extends the hardware cryptographic abilities of the BeagleBone Black.


With the insecurity of connected devices called into question time and time again, wouldn’t it be nice to take comfort in knowing that your latest IoT gadget was secure? A facet in which many Makers may overlook, Josh Datko recently sought out to find a better way to safeguard those designs, all without hindering the DIY spirit. The result? The CrytpoCape — which initially debuted on SparkFun last year — is a dedicated security daughterboard for the BeagleBone that easily adds encryption and authentication options to a project.

Generally speaking, cryptography offers a solution to a wide-range of problems such as authentication, confidentiality, integrity and non-repudiation, according to Datko. SparkFun notes that the $60 Atmel powered cape adds specialized ICs that perform various cryptographic operations, amplifying a critical hardware security layer to various BeagleBone projects.

The CyrptoCape is packed with hardware, including 256k EEPROM with a defaulted I2C address (plus write protection), a real-time clock (RTC) module, a Trusted Platform Module (TPM) for RSA encryption/decryption, an AES-128 encrypted EEPROM, an ATSHA204 CrypoAuthentication chip that performs SHA-256 and HMAC-25 and an Atmel ATECC108 tasked with the Elliptic Curve Digital Signature Algorithm (ECDSA).

“You will also find an Atmel ATmega328P microcontroller and a large prototyping area available on the board. The ATmega is loaded with the Arduino Pro Mini 3.3V bootloader and has broken out most of the signals to surrounding pads,” its SparkFun page reveals.

Beyond that, each easy-to-use CryptoCape comes with pre-soldered headers making this board ready to be attached to your BeagleBone right out of the box. The only additional item a Maker will need to get the CryptoCape fully-functional is a CR1225 coin-cell battery.

Interested? You can check out the product’s official SparkFun page here. Meanwhile, those looking to learn more should also pick up a copy of Datko’s book entitled “BeagleBone for Secret Agents.” The third chapter of the resource is devoted to the CryptoCape where Makers will learn how to combine a fingerprint sensor, the on-board ATmega328P, and the crypto chips to make a biometric authentication system.

Keeping time with a modded Etch-a-Sketch



Dodgey99 had never used stepper motors or real-time clocks before, but that didn’t stop this Maker from creating a really cool Etch-A-Sketch clock.

According to HackADay’s Kristina Panos, Dodgey99 originally employed two 5V stepper motors with ULN2003 drivers, but ultimately decided to upgrade to faster Nema17 motors driven by an ATmega328 powered kit.

“These [original] motors are mounted on the back and rotate the knobs via pulleys,” Panos explained.

“They are kind of slow; it takes about 2 1/2 minutes to draw the time, but the point of the hack is to watch the Etch-A-Sketch.”

Dodgey99 has already written three sketches for the clock: one to configure the RTC, a test hardware run to sample the look of the digits and the main code to replace the very first test sketch.

“The icing on this timekeeping cake is the acrylic base and mounting he’s fashioned,” said Panos.

“During his mounting trials, he learned a valuable lesson about drilling holes into an Etch-A-Sketch. You can’t shake an Etch-A-Sketch programmatically, so he rotates it with a Nema 17.”

Interested in learning more? You can check out the project’s official Instructables page here.

HackADay talks CryptoCape

The CryptoCape – which recently made its debut on SparkFun – is a dedicated security daughterboard for the BeagleBone designed in collaboration with Cryptotronix’s Josh Datko, which features Atmel’s Trusted Platform Module and SHA-256 Authenticator.

12773-03a

HackADay’s Brian Benchoff was lucky enough to catch up with Josh and asked him to break down how the nifty device works.

“If you need to add security to your project or you want to learn more about embedded security the CryptoCape adds encryption and authentication options,” the Maker added.

As its webpage notes, the CryptoCape functions as the BeagleBone’s first dedicated security daughterboard. Known as a BeagleBone Cape, the device attaches to the expansion headers of the BeagleBone and “adds specialized ICs that perform various cryptographic operations which will allow you to add a hardware security layer to your BeagleBone project.”

12773-05a

Previously discussed on Bits & Pieces, the CyrptoCape is packed with hardware, including 256k EEPROM with a defaulted I2C address (plus write protection), a real-time clock (RTC) module, a trusted platform module (TPM) for RSA encryption/decryption, an AES-128 encrypted EEPROM, an Atmel ATSHA204 authentication chip that performs SHA-256 and HMAC-25 and an Atmel ATECC108 that performs the Elliptic Curve Digital Signature Algorithm (ECDSA).

The reasoning behind the developer’s choice to use the SHA-256 Authenticator? “It creates 256-bit keys that can be used in keyed Message Authentication Codes (MACs), or HMAC, to prove the authenticity of the device.” In addition, the authenticator allows the device to “implement an anti-counterfeiting system with the exchange of nonces and MACs between other embedded devices.”

If you are interested in boosting the security of your Maker project or learning more about the CryptoCape, you can head to the product’s official SparkFun page here.

ATmega328 tick-tocks this binary clock


A Maker named Aaron has built a rather impressive binary clock using the shell of an old, discarded hard drive. The unit is powered by a DS1307 Real Time Clock (RTC) module paired with an Atmel ATmega328 microcontroller (MCU).



”As I have an abundant supply of old hard drives, I went the upcycling route and used one for the enclosure. Should add to the clocks nerd cred as well, which can’t hurt,” Aaron explained in a recent blog post.

“You typically need a torx screwdriver bit to crack open most hard drive cases. However, you can bust out some dodgyness and use a flat head if need be.The only parts to be re-used were the body and cover of the hard drive, [although] there’s also some handy rare-earth magnets that can be salvaged.”

Aaron kicked off the binary clock project by marking a grid, then punching and drilling the holes, which he describes as a common LED arrangement for DIY binary clocks. Simply put, the left two columns represent the hours, while the right side displays the minutes.

“Each LED is installed and secured into place with a bit of hot glue. All the LEDs negative legs are soldered together creating a common ground connection. A color coded wire was soldered to each positive connection then insulated with another healthy dob of hot glue,” he continued.

“I had a couple of ATmega328 microcontrollers with Arduino bootloaders (can be programmed by an Arduino) so I breadboarded out a functional Arduino (hackduino) and tested it with the standard blink sketch.”

Aaron then adopted a more permanent model using a protoboard with the RTC – adding outputs for each LED with a resistor in series, 7805 5V regulator and other supporting passive components.



”Once everything was connected up, I let it run naked for a couple of days to make sure everything was sweet. A spare 9v wall wort provides enough power for the unit,” he added.

According to Aaron, the RTC “remembers” the time for approximately 10 years on its own battery, although it is capable of drawing power from an external source when available.

Last, but certainly not least, the Arduino sketch uses Adafruit’s RTC library to interact with the RTC module and ask for the current time/ The sketch then takes those values and calculates which LEDs should be lit to display the current time in binary format.

Interested in learning more? You can download the code here and check out the project’s official page here.

Atmel-based ChronosMEGA measures time

A Maker by the name of N.fletch has debuted the ChronosMEGA, a beautifully designed wristwatch powered by Atmel’s versatile ATmega328P microcontroller (MCU).

“I’ve always loved watches; not only are they aesthetic and beautiful, but they are functional, precise and useful. An elegant fusion between engineering and art; two normally opposed perspectives, now joined in harmonic unison,” N.fletch explained in a recent Instructables post.

“However, all technologies like the dial-up internet, the CVT monitor and the abacus, inevitably will become relics of our past with the advent of advancing technology and have since become less pragmatic for the typical person to own. Unlike these archaic technologies, the wrist watch still thrives on the wrists of many, standing forever as a testament to one of mankind’s greatest inventions: the measurement of time.”

Aside from Atmel’s ATmega328P, key ChronosMEGA specs include binary time encoding (via 10 Blue 1206 LEDs), a slew of buttons to control time, sleep mode and display, a 32.768kHz external crystal and an 8MHz internal clock source.

Additional key features?

  • Micro-USB and charge management controller (for 400mAh Li-ion battery)
  • Draws 4uA in its Deep Sleep mode to last up to 11 years on a single charge
  • Battery indicator 0603 LED
  • Boost TI switching regulator for power regulation
  • Low loss PowerPath controller IC for power source selection
  • Total form factor of 10mm x 40mm x 53mm
  • Custom 3D designed case cast in pure polished silver
  • Genuine crocodile leather watch band

As you can see in the videos above, the layout of the watch configured in a circular array of 10 LEDs. Four of the LEDs account for hours, while six of the LEDs account for minutes.

“The LEDs count in binary to display the time on the watch face. By utilizing a combination of the 10 LEDs, the watch can display any possible time accurate to the minute,” N.fletch continued.

“This is a very clean and elegant way to display time. I also really like this technique because of its esoteric and mysterious nature.”

In terms of the MCU, the ATmega328P is wired in a straight-forward manner, connected to power and ground, with a pull up resistor on the RESET pin. Essentially, the AVR is tasked with driving all the LEDs from its GPIO, although one of the MCU’s AVR’s ADC pin is connected to the battery to detect the voltage level. As such, the watch is equipped with a small red status LED to indicate when battery power is low.

“The AVR has a 32.768 kHz crystal wired to its XTAL pins. It uses the 32.768 kHz crystal to drive its Timer2 module asynchronously for counting the seconds, [while] its internal 1MHz RC clock drives the SW,” N.fletch added.

“32.768 kHz is a very common frequency to drive Real Time Clock (RTC) systems because 32,768 in decimal is equal to 8000 in hex. Therefore, 32,768 can be evenly divided by multiple powers of 2 including 1024. Dividing 32,768 by 1024 yields 32, so configuring the timer to count to 32 with a 1024 pre-scaler will equal an exact second.”

Interested in learning more about the Atmel-based ChronosMEGA? You can check out the project’s official Instructables page here.

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 recently launched SAM D20 ARM Cortex-M0+ based MCU can be used to power such a device, taking all of the above-mentioned design requirements into account.

“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,” Atmel engineering manager Bob Martin told Bits & Pieces.

“How low is low in terms of power consumption? Well, we are talking about <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 reduce CPU activity and power consumption.”

Martin also 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.

As expected, Atmel supports a wide range of dev tools and software, including 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.

SleepWalking Helps Conserve Energy

Imagine you are the sole care-provider for a household full of babies all under the age of 3.  Each and every single one of them requires you to tend their needs and desires.  From feeding to going to the bathroom, from burping to changing their diapers, from bathing to putting them to nap/sleep to keeping them entertained, you are needed every single step of the way.  Isn’t that just exhausting?  Fast forward by a decade when they are grow to become teenagers – autonomy and self-sufficiency – in which they can all satisfy their own basic needs without your help, unless it’s an urgent matter.  Now you have much more free time to read a book, surf the net, get a job, or take a nap.

In essence, this is what SleepWalking is all about in the realm of an Atmel MCU.  Traditionally a technology found in the AVR architecture only, it is now incorporated into the ARM architecture as well.  It is a feature that extends the concept of autonomous peripherals (babies) that operate independently of the CPU core (a parent or care-provider) during active mode, to actually keeping the peripherals functional when the system clock has been stopped. This is achieved by clocking the peripherals using the real‐time clock (RTC), instead of the system clock.

sleepwalking explained

In the SAM4L, SleepWalking has been integrated into many of the peripherals, including the analog comparator, the ADC, the I2C, UART and the capacitive touch interface. It is then the peripheral that decides whether to wake the system, instead of the CPU waking periodically to carry out an interrupt service routine.  With this feature, the need to wake the CPU reduces significantly thus allowing it to stay inactive for longer and more frequent and thereby conserving more energy.

For more information, check out this video for a more detailed explanation on SleepWalking.  Please note: despite the AVR UC3 being used as an example in the video, the underlying fundamentals of how SleepWalking works and its benefits are the same as in the ARM SAM4L.