Accurate Time Keeping in Embedded Systems

In many embedded systems, there is a need to keep accurate time/date. This is often performed using an RTC (Real-Time Clock). However,  uncalibrated RTC are not that accurate. For example, ST Microelectronics M41T94 RTC datasheet explains that: Uncalibrated clock accuracy will not exceed ±35 ppm (parts per million) oscillator frequency error at 25°C, which equates to about ±1.53 minutes per month. . In order to improve the accuracy, you’ll need to calibrate the crystal for each board at the factory using a frequency counter, that will greatly improve accuracy, for M41T94: When the Calibration circuit is properly employed, accuracy improves to better than ±2 ppm at 25°C. However, calibrating the crystal will further increase the manufacturing costs. Another way to have a very accurate time keeping, is to use the power supply frequency (50 Hz/60 Hz) which is extremely accurate due to interoperability requirements between electricity providers. In the diagram […]

Socket Programming: Client crashes when exiting server

One of our digital signage applications was crashing when the control server was shutdown at the same time a command was sent with no apparent reason. It would always crash inside the write function (see code below) and no error message were returned. sent = write(fd, buf, n); After a while, we found that in case the connection with the server is lost, and write tries to access the server, it will generate a SIGPIPE signal and in most systems, the application would just exit by default. A simple way to handle this case was to ignore the pipe signal by adding the following line during initialization: signal(SIGPIPE, SIG_IGN); In case the server is down at the time the write function is called, the signal SIGPIPE would be ignored, write would return -1 and errno should return 32 (Broken pipe). Alternatively, if needs be you could also handle the SIGPIPE […]

Khadas Edge2 Arm mini PC

Archos 101 Archos 70 with Android 2.2

In the previous blog post about Archos 70 Video Review, I mentioned the device was running on Android 2.2. This is not currently accurate, as the device now ships with Android 2.1, but will be upgradable to Android 2.2 soon after. [ad#Google Adsense – Wide Banner] In the meantime, here’s an another Charbax’s video about Archos Gen8 devices (i.e. Archos 28,Archos 32, Archos 43, Archos 70and Archos 101) running a beta version of Android 2.2 for this series of devices.

Finding a device IP Address

If you are developing software for an Ethernet (or Wifi) device, you’ll need to access the board for debugging and/or testing purpose. If your board does not have user interface or the serial port is not available, you’ll have to find the IP address (assuming it is using DHCP) before accessing the board thru telnet or ssh. A simple way to do that is to ping the broadcast address and check the arp table. > ping -b 192.168.0.255 WARNING: pinging broadcast address PING 192.168.0.255 (192.168.0.255) 56(84) bytes of data. 64 bytes from 192.168.0.246: icmp_seq=0 ttl=64 time=0.018 ms 64 bytes from 192.168.0.101: icmp_seq=0 ttl=64 time=0.217 ms (DUP!) 64 bytes from 192.168.0.246: icmp_seq=1 ttl=64 time=0.023 ms > arp -i eth0 arp -i eth1 Address                  HWtype  HWaddress           Flags Mask            Iface 192.168.0.103            ether   00:50:FC:00:00:01   C                     eth1 192.168.0.109            ether   00:13:20:01:01:01   C                     eth1 If you cannot find your device, it may be configured to […]

Archos 70 Internet Tablet Video Review

Archos as just released a new 7″ Android Tablet. This device costs around 275 USD (249 Euros), which is a pretty good price for a device based on an ARM Cortex A8 at 1 GHz running Android 2.2, a capacitive touch screen (800×480), HDMI output (Up to 720p), built-in wifi (802.11n) and bluetooth 2.1 as well as a front facing camera. Bear in mind that you won’t be able to take pictures or videos with this device since there is no camera on the back of the device. Go to Archos website to get the full technical specs of Archos 70. Here are two videos of the device by Charbax. The first video shows web browser, video playback, google app market place, video playback on TV thru HDMI and facebook. The second video shows the dolphin web browser used with a bluetooth keyboard, video chat with fring (still have some […]

How to check open files for a process

While debugging your program, you may encounter the message “Too many open files”. One way to fix the issue could be to review your code and check open, fopen, socket and pipe calls are matched with close and fclose calls, but with large projects this may be cumbersome. A better way is to list the open files using the proc filesystem. I’ll use VirtualBox program as an example since this is running in our server. First, locate the process ID (PID): pgrep VirtualBox 3901 3950 Then list the file descriptor opened for process 3901 sudo ls -l /proc/3901/fd total 0 lrwx—— 1 root root 64 2010-10-05 14:52 0 -> /dev/pts/1 lrwx—— 1 root root 64 2010-10-05 14:52 1 -> /dev/pts/1 lr-x—— 1 root root 64 2010-10-05 14:52 10 -> pipe:[15825] l-wx—— 1 root root 64 2010-10-05 14:52 11 -> pipe:[15825] lr-x—— 1 root root 64 2010-10-05 14:52 12 -> pipe:[15829] […]

Intel Arc Graphics Technology

Netgem Set-top-box N5000 – Toshiba Places

Mid-september, Netgem showcased their new set-top box at IBC 2010: the Netbox N5000 Internet/TV Adaptor. A modified version of this Set-top box will be used by Toshiba (Toshiba places) and be available for purchase for 99 Euros starting in October 2010 in France and later in 2011 in some other Europeans countries. [ad#Google Adsense – Wide Banner] First let’s have a look at the casing (Not the one used by Toshiba places). The front panel has the Power LED, a USB port and the remote sensor. They’ll either provide Infrared or RF remotes depending on the end customer requirements. The back of the set-top box features TV In/Out, Digital Audio (S/PDIF) output, HDMI output, an Ethernet port and the power jack (+12V). Their product brief also mentions a USB port on the rear as an option and Wifi support (802.11n). The Netbox N5000 hardware is based on Sigma Designs SMP8655 […]

Resources for Telechips TCC890x: TCC8900 & TCC8902

Telechips TCC 890x is now widely used in low cost Android Tablets among other applications (automotive, portable media player..). Here’s the description provided by Telechips: The TCC890x is a system LSI for digital multimedia applications based on ARM1176JZF-S, an ARM’s proprietary RISC CPU core. It is designed for high-end multimedia entertainment devices such as car AVN, portable multimedia player and home entertainment. The TCC890x supports decoding and encoding various types of video and audio standards with software and dedicated hardware codecs including JPEG / MPEG1 / MPEG2 / MPEG4 / H.264 / VC-1 up to Full HD (1080p) and MP3 / WMA / EAAC+ / AC3, etc. In addition, TCC890x offers a hardwired 3D graphic accelerator to enrich next generation GUI and other graphical applications. Although, Telechips claims to support WinCE, Embedded Linux and Android, they now fully focus on Android development giving other OSes a lower priority. However, the development board […]

Khadas VIM4 SBC