Thursday 6 September 2018

Surface Pro (2018) for Embedded Software Development

Summary
This blog examines the feasibility of using the Surface Pro 2018 'Surface' as an alternative to a Windows based laptop or desktop machine for the purpose of embedded software development.

Consideration was given to targeted metrics which consisted of physical handling, connectivity, storage speed and keyboard solutions. For a performance comparison, two common software packages were used to compile example projects on the Surface and a reference Asus laptop. Metrics dependent on factors which were difficult to verify, such as battery life, were not examined.


Surface Pro i5
Surface Pro i5
Testing was performed on a Surface Pro i5 over the duration four weeks, with the default Windows 10 Professional installation.


Surface Pro Hardware
Surface Pro Hardware

The Surface Pro i5 uses the Intel 7300U processor and was loaded with 8GB of RAM running Windows 10 Professional.


Surface Pro Windows Version
Surface Pro Windows Version

Handling and Portability
As a desktop replacement, without the addition of a keyboard such as the Surface Type, the Surface Pro 'Surface' is a befitting of the name space saver. Notably for small benches or work spaces the footprint of the Surface is very appealing which makes shifting or repositioning the Surface comparably easy moving from a laptop.

Off the bench in general use, the low weight of the Surface results in relative ease of movement. The kickstand was adjusted in the same manner a laptop display would be moved to cater for varying locations or seated positions.


Bluetooth
During point and select operation during code changes, use the Surface Pen was used without any issue. Other Bluetooth devices in the same proximity to the Surface did not cause any interference. 

Wireless
The wireless maintained connection whether at short distances (1m) or longer distances (30m) from a wireless router (BiPac). Only one dropout was noted during the test period.

Wi-Fi Bandwidth testing was performed using a local server, albeit slow. The Surface and Asus devices were both loaded with IPerf 3.1.3, then several tests conducted. Tests were conducted using the bidirectional configuration in IPerf.

SO_SNDBUF is 212992
[  4] local x.x.x.x port 56795 connected to y.y.y.y port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  18.8 MBytes   157 Mbits/sec
[  4]   1.00-2.00   sec  15.8 MBytes   132 Mbits/sec
[  4]   2.00-3.00   sec  12.8 MBytes   107 Mbits/sec
[  4]   3.00-4.00   sec  11.5 MBytes  96.2 Mbits/sec
[  4]   4.00-5.00   sec  10.8 MBytes  90.4 Mbits/sec
[  4]   5.00-6.00   sec  10.0 MBytes  83.7 Mbits/sec
[  4]   6.00-7.00   sec  11.6 MBytes  97.6 Mbits/sec
[  4]   7.00-8.00   sec  11.0 MBytes  92.3 Mbits/sec

[  4]   8.00-9.00   sec  10.8 MBytes  90.1 Mbits/sec

Shown below are the results of the bandwidth tests conducted.


Surface Pro vs Asus Wi-Fi Bandwidth Results
Surface Pro vs Asus Wi-Fi Bandwidth Results
USB
The Surface's single port USB connection could certainly be considered a limitation for a embedded software or hardware developer who may need two or more USB ports.

During development the single Surface USB port was connected to a USB hub which facilitated a mouse, keyboard and programming adaptor. In some instances a serial adaptor was required. There were no issues relating to the download of drivers, operation of the USB or the performance of the adaptors.


Storage
For copying medium sized (>500Mb) files between computers either, an SD card or USB drive was used. With a meagre 128 Gb internal SSD, the removable SD card was used to store working files and backups.

The USB port was usually broken out to a hub, consequently little commentary on use with insertion of various USB equipment.

Inserting and removing the SD card from the Surface was seamless. The location of the SD slot behind the kickstand resonated with me for typical operation. 

For comparison of copy speeds for the SD card, an Asus i7-77HQ provided results as a reference device.

SD Speed
SD Card testing was performed with a Strontium Nitro 433X Class 10 16 Gb SD using the test software H2testw 1.4. This package was selected because it was capable of testing SD and USB.


Strontium Nitro 433X
Strontium Nitro 433X
Several tests were conducted using the Strontium Nitro on the Surface and Asus with the results displayed below.


Surface Pro vs Asus SD Card Read Speeds
Surface Pro vs Asus SD Card Read Speeds


Surface Pro vs Asus SD Card Write Speeds
Surface Pro vs Asus SD Card Write Speeds
USB Speed
Speed testing was performed with a Silicon Power USB 3 32GB drive using the same test software, H2testw 1.4, that was used with the SD card.


Silicon Power USB 3 Drive
Silicon Power USB 3 Drive
Again several tests were conducted using the Silicon Power USB on the Surface and Asus with the results displayed below.


Surface Pro vs Asus USB Drive Read Speeds
Surface Pro vs Asus USB Drive Read Speeds
Surface Pro vs Asus USB Drive Write Speeds
Surface Pro vs Asus USB Drive Write Speeds
Software Compile Times
The first application used for comparing software compile times was the 'Maker' popular Arduino, version 1.8.6.

Arduino
Three example projects were built on the Surface and an Asus laptop. Timing of the compile process was performed manually therefore some tolerance in timing shall be noted.


Surface Pro vs Asus Arduino Project Compile Times
Surface Pro vs Asus Arduino Project Compile Times
PSoC Creator
Again three example projects provided by Cypress were built on the Surface and an Asus laptop using PSoC Creator 4.2 'IDE'. Timing of the compile process was taken from the start and end times noted in the IDE output window.


Surface Pro vs Asus PSoC Creator Project Compile Times
Surface Pro vs Asus PSoC Creator Project Compile Times
Code Editing
Editing code with an application such as PSoC Creator, utilising the on-screen Surface keyboard was more cumbersome compared to a standard mechanical keyboard. One of the primary reasons was the standard Surface keyboard on-screen layout results in additional key presses to realise straightforward characters. For instance, at worst case, curly, round or square brackets would require three button presses.
A further reason for using a Surface Keyboard or a similar external keyboard solution was the on-screen keyboard does not display when text areas are clicked for editing. The on-screen keyboard had to be invoked manually.


Silicon Labs PSoC Creator Project on Surface Pro
Silicon Labs PSoC Creator Project on Surface Pro
On-Screen Keyboard
There were some initial complications with phantom presses. Applying the Microsoft HotFix for Surface Pro 4 resolved this issue.

Using the Surface Pro in landscape mode was personally the preferred option when writing code because the rear stand was used in the lowest position. Typing with the Surface flat on the desk was achievable although did not suit my office layout. The above image shows typically the ratio of code to keyboard that was used while developing the Silicon Labs blog.

Surface Pen
For specific editing tasks such as selection of text, repositioning selected text or moving on-screen objects the Surface Pen is a handy tool however, a standard external mouse will achieve the same result. People using the Surface Pen for more advanced tasks may have different feedback on its suitability.

Microsoft Surface Cover (Keyboard)
As a keyboard solution, the Surface Cover was more than reasonable with the depth of keystrokes sufficient to provide tactile feedback. The backlight keys on the Surface Cover were handy when typing whilst in low lighting conditions.


Surface Pro with Surface Cover
Surface Pro with Surface Cover
Final Thoughts
For embedded software development the Surface Pro is a worthy competitor to devices with similar specifications and features already in the market. 

In this setting, pro's for the Surface were the lightweight, fan less design, ease in handling and a solid Wi-Fi performance.

Unsurprisingly con's for the Surface related to limited connectivity resulting from the single USB port, throttled processor performance and initial phantom touch screen issues. The latter touch issue being the most obstructive as this phenomenon prevented device useability to the point of preventing logging onto the Operating System.

In a nutshell choosing the most suitable device ultimately depends on the requirements of the end user. Certainly for embedded software development other devices such as the middle to high end Lenovo Yoga, Dell Inspiron 13 or the HP Spectre may be a more suitable solution.