Archive for April, 2013

Compiling u-boot for i.MX6 Sabre Lite board

April 25th, 2013

In this post we will walk through the steps to compile port the u-boot for the Freescale's Cortex A9 based Sabre Lite board.

The Tool chain

Freescale provides its own tool chain that it calls LTIB ( Linux Target Image Builder). You can download and install the toolchain from its website. It has a good documentation as well. However, in this post we will use a generic tool chain. There are certain advantage with the generic tool chain. You get accustomed to the generic compile environment that you can apply for other boards.

If you have not already installed ARM compiler tool chain, you can do so using

#apt-get install gcc-arm-linux-gnueabi
#apt-get install g++-arm-linux-gnueabi

This applies for the Ubuntu and debian ( has been tested on debian).

Next grab a fresh copy of the u-boot from

using git command

git clone

You should see a directory called u-boot-2009-08. Change to that directory

cd u-boot-2009-06

This u-boot has several branches. There is a branch that corresponds to the Android 13.4. To check it out use

git checkout origin/boundary-imx-android-r13.4-ga -b boundary-imx-android-r13.4-ga

( You can use similar command for future version. Just replace boundary-imx-android-r13.4-ga with the branch that you want to check out).

You can compile the source code using

make mx6q_sabrelite_config
make all

We found that this compile gave the error, something like

arm-linux- not found.

To fix this open lib_arm/ and change

CROSS_COMPILE ?= arm-linux-


CROSS_COMPILE ?= arm-linux-gnueabi-

And try compiling again using

make mx6q_sabrelite_config
make all

If everything goes well, the code should compile and you should see u-boot.bin in your current directory.

We have captured the whole sequence in youtube

If you plan to boot your board using SD card, you can use the following dd command to copy u-boot.
dd if=u-boot.bin of=/dev/sdb bs=512 seek=2 skip=2 conv=fsync


Check Audio Register Values in SGTL5000 driver in i.MX6

April 24th, 2013

Freescale's i.MX6 Sabre Lite board has the SGTL5000 Audio IC for Audio. The value of the registers of the Audio IC can be checked using the command

cat /sys/class/sound/card0/device/HiFi/codec_reg

A typical value found is as follows

0000: a011
0002: 0060
0004: 0008
0006: 0010
0008: 0010
000a: 0010
000c: 0000
000e: 320c
0010: 6666
0012: 3c3c
0014: 015f
0016: 0000
0018: 0000
001a: 0000
001c: cd2f
001e: 000e
0020: 0000
0022: 7f7f
0024: 0022
0026: 0008
0028: 0121
002a: 0000
002c: 0322
002e: 0404
0030: 5260
0032: 5000
0034: 0000
0036: 0017
0038: 01c0
003a: 0000
003c: 0000
003e: 0000
0040: 0000
0042: 0000
0044: 0000
0046: 0000
0048: 0000
004a: 0000
004c: 0000
004e: 0000
0050: 0000
0052: 0000
0054: 0000
0056: 0000
0058: 0000
005a: 0000
005c: 0000
005e: 0000
0060: 0000
0062: 0000
0064: 0000
0066: 0000
0068: 0000
006a: 0000
006c: 0000
006e: 0000
0070: 0000
0072: 0000
0074: 0000
0076: 0000
0078: 0000
007a: 0000
007c: 0000
007e: 0000
0080: 0000
0082: 0000
0084: 0000
0086: 0000
0088: 0000
008a: 0000
008c: 0000
008e: 0000
0090: 0000
0092: 0000
0094: 0000
0096: 0000
0098: 0000
009a: 0000
009c: 0000
009e: 0000
00a0: 0000
00a2: 0000
00a4: 0000
00a6: 0000
00a8: 0000
00aa: 0000
00ac: 0000
00ae: 0000
00b0: 0000
00b2: 0000
00b4: 0000
00b6: 0000
00b8: 0000
00ba: 0000
00bc: 0000
00be: 0000
00c0: 0000
00c2: 0000
00c4: 0000
00c6: 0000
00c8: 0000
00ca: 0000
00cc: 0000
00ce: 0000
00d0: 0000
00d2: 0000
00d4: 0000
00d6: 0000
00d8: 0000
00da: 0000
00dc: 0000
00de: 0000
00e0: 0000
00e2: 0000
00e4: 0000
00e6: 0000
00e8: 0000
00ea: 0000
00ec: 0000
00ee: 0000
00f0: 0000
00f2: 0000
00f4: 0000
00f6: 0000
00f8: 0000
00fa: 0000
00fc: 0000
00fe: 0000
0100: 0000
0102: 0000
0104: 8040
0106: 051f
0108: 0000
010a: 0040
010c: 0000
010e: 0000
0110: 0000
0112: 0000
0114: 0000
0116: 002f
0118: 002f
011a: 002f
011c: 002f
011e: 002f
0120: 8000
0122: 0000
0124: 5100
0126: 1473
0128: 0028
012a: 0050
012c: 0000
012e: 0000
0130: 0000
0132: 0000
0134: 0000
0136: 0000
0138: 0000

The command was printed from the Android command line. You may use Android tinymix to change the values of ( some of the) registers.

We were debugging some issue in the Freescale's Sabre Light board where the volume on the line out was not good enough. It turned out that the min value of the CHIP_DAC_VOL ( in register 0x0010) corresponding to the maximum volume reached only upto 0x60. Its lowest value is 0x32. The issue was fixed by changing the lowest reachable value to 0x3C.


International shipping of Book - "Signal Integrity for PCB Designers" and other tidbids

April 11th, 2013

At we also sell the book "Signal Integrity for PCB Designers" directly for $40 ( as compared to $55 at amazon). Buyers can buy the book either at amazon or at There is no difference in the book, Edition or print format. We just pass the saving that otherwise goes to Amazon.

We still find difficulty in shipping the book Internationally. We had trouble with one of the buyers who purchased the book and wanted it to be shipped at Brazil. While we still accommodated the request and the book was shipped by USPS, the buyer complained a week later that the book was not received. There was a lot of communication and eventually a compliant with Paypal was filed by the buyer. It looked embarrassing for us trying to justify our stand that the book was indeed been shipped. We absorbed the international shipping cost ( $20), that left almost no margin for the $40 book. But we finally heard from the buyer that he received the book delayed substantially, almost over a month, after shipment. He was also kind enough to withdraw complaint from paypal. Sigh of Relief !!!

More recently Mansi Research purchased the book and wanted it shipped at its India Address. We communicated our concerns of international shipment and our earlier bad experience. They were quick to send their UPS account number. The book was promptly shipped and tracking number communicated.

We have therefore clearly indicated on the Book Sale page that

The book will only ship in US. If you are planning for International shipping please write us at info at It may incur additional charges.

There are other events happening at A request for the OrCAD pspice tutorial was received from Abhinand Rao.

I am a student learning orcad capture, i read through your website it helped me but i wanted to ask you if you could please post a tutorial on simulations on ORCAD capture, i.e explaining all the analysis from transient to ac sweep & their subtopics eg secondary sweep,monte carlo, parameter sweep.
I actually am struggling to get an answer for this question can i get a curve where in i use a dc sweep analysis i am sweeping current on x axis & voltage on y axis but i also want the curve for different frequencies, i.e i also want to sweep the frequency along with current is it possible.
please help me.


While we do use Pspice occasionally, we never put up the tutorial for it. We are not sure when we can upload the tutorial, but it is something in our radar. Possibly this weekend (by April 14, 2013) or the next week end. Stay tuned.

In the meantime we also put up a lot of software tutorials. Please check the following pages in Java tutorial

Java For Loop
Java Break Continue
Java Switch Statement
Ternary Conditional Statement
Compound Assignment Statement
Array in Java
2D Array in Java

We also started the Java GUI tutorial. You may like to check the Java Swing Tutorial .

One more thing - a number of our tutorial have not gone through proof reading. So you may come across some typos and other errors. We encourage you to bring these errors to our notice. We have a plan to go through all the text material and fix them, but we do not know when.