In early February 2015, British Raspberry Pi Foundation came, quite unexpectedly with a new generation of Raspberry Pi computer. This time, however, improvements was not related only to peripherals, but the heart of Raspberry Pi – Broadcom SoC has been upgraded. At that time considerably obsolescent BMC2835 based on a single core ARMv6 CPU has been replaced by the BCM2836. Raspberry Pi 2 is therefore driven by four Cortex-A7 cores at 900MHz and compared to the previous generation is several times more powerful.
Package
You will get Raspberry Pi 2 in neat cardboard box (its appearance may vary depending on the manufacturer). Package contains only a brief manual with safety informations and actual Raspberry Pi 2 in an antistatic bag.
Hardware
Raspberry Pi 2 is based on a SoC (system on chip) with a model designation Broadcom BCM2836. It conceals four Cortex A7 cores default clocked at 900MHz (can be overclocked up to 1,1GHz). Cortex A7 core is based on the ARMv7 architecture (while the previous generation used ARMv6, more details ARMv6 vs ARMv7). In addition to common extensions like thumb2 or VFPv2 processor also includes NEON SIMD engine. GPU remained the same as in previous models. Graphics acceleration is performed by VideoCore IV clocked at 250MHz (24 GFLOPs), supporting OpenGL ES 2.0 or hardware encoding/decoding H.264 1080p30.Inputs and outputs, as well as the entire board layout remained compatible with previous Raspberry Pi B+. Video output is provided by HDMI 1.3a (supporting audio over HDMI) and by an analog composite output (NTSC/PAL). Another analog output is stereo audio output. Composite video output and audio output are sharing the same connector – 4-pole jack (same as Raspberry Pi B+). BCM2836 SoC is directly connected to MIPI-CSI and DSI interfaces via differential busses. GPIO header is also improved over Pi B and now has 40 pins (vs 26 pins on Pi B). GPIO header has 40 pins and is again by the layout and electrically compatible with Raspberry Pi B+. Still, there is I2C, SPI, I2S and UART (default is used for the Linux terminal) and a dedicated I2C bus to communicate with compatible expansion modules (called HATs). It is also possible to directly download driver (resp. Device tree overlay ) from the HAT via this I2C and apply it to the operating system. GPIO pins still utilize 3.3V TTL logic levels and are not 5V tolerant. RAM chip is LPDDR2 type and is mounted on the bottom side of the board.
The power supply circuit is still based on integrated dual switching regulator (providing 1.8V and 3.3V). Newly there is also NCP6343 switching regulator used. It is a miniature chip (wafer-level package ), which became infamous for its sensitivity to ambient light and its ability to reboot or freeze RPI when eg. shooting Raspberry Pi with Xenon flash (details about this issue on EEVblog https://www.youtube.com/watch?v=SrDfRCi1UV0)
USB hub and Ethernet 100Mbit controller are solved by a LAN9514 chip (same as in case of the Raspberry Pi B+). The LAN9514 chip is connected to the BCM2836 SoC again via USB. This still represents a bottleneck (one USB transfers the four equally fast USB + Ethernet).
SoC | Broadcom BCM2836 |
CPU | quad-core Cortex A7 at 900MHz |
Architecture | ARMv7 |
RAM | 1GB LPDDR2 |
GPU | VideoCore IV |
Storage | microSD card |
I/Os | RJ45 for 10/100 ethernet, HDMI (full size), MIPI-CSI for camera, DSI connector for display, 1x microUSB for power supply, 4x USB2.0 host, 40pin GPIO header, 3.5 4-pole jack for audio output and analog. video output |
Power | 5V/2A |
Dimensions | 56×85mm |
Power consumption
Consumption measurement was performed without connected USB peripherals. Used OS is Raspbian Wheezy, started to console.
halted board | 0.325W (65mA) |
system idle (LAN disconnected) | 1W (213mA) |
system idle (LAN connected) | 1.3W (260mA) |
all CPU cores at 100% (LAN connected) | 1.95W (390mA) |
Software
Raspberry Pi 2 requires an operating system capable of running on ARMv7 architecture. Thanks to backward compatibility of ARMv7 (to ARMv6), the original Raspbian compiled for ARMv6 still can be used. System among other things, includes proprietary GPU drivers for the VideoCore IV, many Device tree overlays for controlling various peripherals or utilities for easy configuring of RPi. The system includes a graphical desktop environment LXDE. However, all is currently compiled and adapted to the original outdated processor (based on the ARMv6 with Thumb and VFPv2 extension). Raspbian uses its own package repository to ensure compatibility with the custom system build. On Raspberry Pi 2 however, you can also use regular Debian armhf repository, where you can found newer packages and binaries compiled natively for ARMv7.
For purposes of software development, you can choose from the classic variety of programming languages available on Linux. Although Python is sometimes perceived as the preferred language for RPi (Python IDE is pre-installed and Python is recommended by RPi creators), there is no problem to develop natively in C/C++ or use anything else. For example popular IDE Code::Blocks (available in the official repository) works at RPI fairly smoothly. Of course, you can use gcc (g++) directly and compile only via terminal. Compiling on such slow machine, however, is not very comfortable (most likely the reason why interpreted languages scoring on RPi) and it worth considering rather using of cross compiler running on some more powerful machine. Thanks to the wide and productive community there is a lot of libraries for controlling of GPIO ports (Pigpio, WiringPi or RPi.GPIO). Also many “drivers” (overlays or kernel modules) are available for various external circuits. It is also very easy to control various buses (I2C, I2S, SPI, UART) from your software.
There are many other available alternative operating systems, respectively their ports like Ubuntu mate, OSMC, OpenELEC or OpenWrt. Different systems are often dedicated to serve some specific purpose and are intended for use of RPi as embedded device. Newly there is also Windows 10 IoT Core operating system available for the Raspberry Pi 2.
Windows 10 IoT Core
For fans of Microsoft and the C# language is undoubtedly good news that Windows 10 IoT Core will be available in a version for Raspberry Pi 2. For those who hear about Windows 10 IoT for the first time, I will briefly remind that it is the edition of Windows 10 designed for small devices from the world IoT (internet of Things). The system does not contain any graphical user interface (except basic configuration screen) and, of course, does not run any x86 applications from the world of desktop Windows. Windows 10 IoT Core theoretically allows running of universal Windows applications (UWP). However, basically only applications tweaked for RPi already during their development will work without any problem. It is also necessary to consider the fact that the graphics of universal application is often closely tied to the DirectX, which does not have direct support on RPI GPU. Many applications will work without hardware graphics acceleration and many tasks using specific GPU features will not work at all (hardware encoding/decoding, MIPI-CSI camera). It is also necessary to take into account that the system is still evolving and many hardware components of RPI may not have drivers available yet.
What currently does not work on Windows Core IoT:
- audio output
- composite video output
- I2S bus
- hardware PWM
- hardware graphics acceleration
- Raspberry Pi Camera (MIPI-CSI)
- UART
Most of various shields, HATs, USB Wifi dongles, 3G dongles, bluetooth dongles etc. also does not work out of box. Sometimes community helps to solve something, but around proprietary Win IoT is logically community thinner than around Raspbian.
Official list of supported devices:
https://ms-iot.github.io/content/en-US/win10/SupportedInterfaces.htm
For software development for Windows IoT Core you need a PC with installed Windows 10 and Visual Studio 2015. The configuration of Windows IoT Core can be done using a web interface or (more advanced) through PowerShell. Development and debugging is done remotely via an Ethernet connection. Everything can be operated very comfortably from the desktop environment of your PC. You can employ C++ for development but of course, more user-friendly C# is preferred language. It is quite easily to create for example web server or TCP server controlling GPIO pins. There is a lot of nice C# examples available. Windows IoT Core is therefore quite suitable for learning purposes. Microsoft recently released Windows Core for commercial use (through so-called Commercialization process, viz https://blogs.microsoft.com…).
The small snag is that Windows IoT Core will be equipped with mandatory automatic updates which can cause spontaneously reboot or suspending of your device during the install. Software of such device is therefore no longer behaving deterministically and is inappropriate to use in critical embedded applications. To resolve this problem it is necessary to use Windows IoT Core Pro, which will, however, not be for free. Microsoft thus seems to builds on policy (applied to desktop Win10 already), that you need to pay not only for extra features but also for full control over your own device.
Benchmarks
working on it…
Conclusion
Raspberry Pi 2 is the second most powerful available Raspberry Pi (now surpassed by Raspberry Pi 3). It is maximally compatible with the previous Raspberry Pi B+ (including the layout of the PCB and the location of the mounting holes). Also, software compatibility is preserved thus, the upgrading from previous generations can not be easier. Currently, Raspberry pi 2 is outclassed by Raspberry Pi 3, which is with the same price tag (35$), superior in almost every aspect. However, if you need a full featured PL011 UART on main GPIO header, Raspberry Pi 2 can be still better choice for you.
Thanks for the article. I want to try Windows Iot. Where can I get it?
Hi, you can download it from: https://developer.microsoft.com/cs-cz/windows/iot/Downloads.htm