Whitepaper: Preventing Filesystem Corruption in Embedded Linux*

If you’ve ever been concerned with or experienced disk and filesystem corruption in an embedded Linux environment, you’ll want to take a look at this whitepaper to help you understand and prevent it.    Home

Preventing Filesystem Corruption in Embedded Linux

Almost any computer system is subject to unexpected power failures. For some embedded systems, this only occurs when the power grid goes down. For others, it may happen when a user decides to pull the plug instead of using a documented shutdown procedure. Automotive and remote systems need to anticipate that power will stop and start several times a day. If an embedded system is implemented without thinking about what happens when the power goes down it could lead to catastrophic failures down the road. Due to the nature of failures caused by unexpected power loss an embedded system may run for weeks, months, or years before users experience an unexpected and catastrophic failure. From the user’s perspective, their device worked fine yesterday and today it doesn’t even turn on, and they don’t tie it back to the unexpected power failure event.

One collection of failure types caused by unexpected power loss are those related to issues with the boot medium. Investigating the boot medium failure as a result of power loss may show an unclean filesystem, missing files, or more commonly a filesystem that only mounts as read only. The latter happens when the filesystem detects a serious problem with filesystem metadata during runtime that it cannot fix automatically causing it to remount read only to avoid writing to prevent further corruption on the disk. Many people turn to common journaled filesystems like ext3/ext4 to attempt to address these failures. While journaled filesystems like ext3/ext4 are less prone to corruption, they are far from immune.    Home

*Read the rest on Technologic System’s offical website,Preventing Filesystem Corruption in Embedded Linux

How to Write an SD Card Image (Linux, Windows, Mac OSX)

sd-card

The question “How do I write a TS Image to an SD card under Linux / Mac OSX / Windows?” comes up quite a bit when dealing with embedded systems or any situation where you want to make an exact, bit-by-bit copy of a removable storage card or disk. While the following guide talks about our products, it can be applied generically. Read through it first to make sure you have a basic, core understanding of the instructions given, and then apply them to your situation. We’ll be looking at how to write to an entire disk and/or a specific partition on that disk using the dd command, a common utility found in most unix systems for low-level operations on hard disks. Jokingly, ‘dd’ stands for “disk destroyer” or “delete data”, so take care!      Home

Continue reading “How to Write an SD Card Image (Linux, Windows, Mac OSX)”

Getting Current Voltage Input (VIN) on TS-7670 or TS-7400-V2

Here’s an example program our engineers might find useful. Kris Bahnsen, a long time engineer for Technologic Systems, wrote this simple program to get the voltage input (Vin) on the 8 – 28 VDC power rail on the TS-7670(Rev. D or later) or TS-7400-V2 (Rev. B or later). Without going into too much detail about implementation of the on-board supervisory microcontroller, there is a register which is used to store various ADC values, including Vin. This example program basically polls this 4byte register via I2C interface, accounts for the voltage divider (see TS-7670 schematic or TS-7400-V2 schematic), and outputs the Vin value.       Home

So, without further ado, here’s the code:

Continue reading “Getting Current Voltage Input (VIN) on TS-7670 or TS-7400-V2”