embedded software boot camp

An embedded systems hardware test – a collaborative effort

Friday, February 25th, 2011 by Nigel Jones

Regular readers will probably be aware that back in 2000 I wrote an article for Embedded Systems Programming magazine entitled A β€˜C’ Test: The 0Γ—10 Best Questions for Would-be Embedded Programmers. In the intervening years I have often thought that it would be entertaining / useful to come up with a similar testβ€”except this time I would be testing someone’s hardware knowledge. As a result over the years I have collected together a number of fun questions, which I intend to use in the forth-coming article. However it occurred to me that I have a lot of very smart readers and that collectively we could put together a far better test than I could do so on my own. Thus I’m looking for your hardware questions! Before you flood me with your suggestions here are the ground rules:

  1. Embedded systems design, not hardware design
    The test is intended to test the hardware knowledge of persons writing embedded code. It is NOT a test for persons that will be designing hardware. Thus questions about the minutiae of hardware filter design are not what I’m looking for.
  2. Traps
    The best questions will be examples from your past where someone got into trouble because they didn’t understand something about the hardware that you thought they should have.
  3. Why
    As well as posing the question (and giving the answer!), please explain why you think it’s important that someone should know what you are asking.
  4. Oscilloscope and logic analyzer
    I expect that the questions will cover circuits, processor architectures and tools. While I’m interested in all three, I’m particularly interested in elegant questions that will allow the questioner to determine if the candidate knows how to use an oscilloscope or logic analyzer.
  5. Original
    Please don’t send me any copyrighted or plagiarized material. Links are of course fine. (I mention this because not only is it legally and morally wrong – but I’m also tired of people ripping off my work and claiming it as their own).
  6. Attribution
    If I choose to use your suggestion, then tell me how you’d like it attributed. Full name + email address through anonymous are all fine.
  7. Early bird…
    If I get multiple similar suggestions, then the first one received gets the credit.
  8. Fame
    By sending me something you are agreeing to let me publish it. Other than attribution (and the accompanying fame πŸ™‚ ), no other compensation will be given.

Anyway, if you’d like to participate then contact me

Thanks! I expect that I will publish the article in a few weeks.

18 Responses to “An embedded systems hardware test – a collaborative effort”

  1. Larry says:

    A few good questions immediately come to mind.

  2. Brad Mosch says:

    Mr. Jones,

    I’m fairly new at learning the embedded side of programming. I’ve done bunches of test station programming in C++ and LabVIEW, and I’ve even managed to learn enough VHDL on my own to create a very functional and useful sync generator that allows us to capture a very non-standard video signal using a standard frame grabber card. On the embedded side, I’ve had to deal with loading multiple devices on one circuit board with JTAG. One device is Altera, one is TI, and another is another brand. These devices are on 2 different JTAG chains, so the process involves using a different programming cable and procedure for each device which seems kind of ridiculous. I’ve seen some “universal” JTAG cables available, so I was wondering if there is a practical way to use one of those to come up with a process to program everything at once. I’m hoping both JTAG chains could even be jumpered together to program everything at once, but that’s not even the most important part. The important part is being able to come up with a way of using SVF files or other universal programming scripts to be able to program anything using an inexpensive, universal cable. I think this an important part of the development process/setup since I have personally observed a cubicle neighbor fighting with all the different cables and adapters necessary on yet another project. I’ve read through general JTAG tutorials on various sites, but a realistic tutorial on the current state of programming various embedded devices in the real world would be really great. A very knowledgable JTAG person on a team would be very nice (which we don’t have).

    • Nigel Jones says:

      I’m no expert on JTAG. Anyone have any suggestions for Brad?

      • Bob Williams says:


        JTAG allow the user to chain together a variety of different devices and still talk to just 1 of the devices in the chain. For this to work the other devices are put into bypass mode with a JTAG instruction. To program a single device after this you just need to pad the beginning and end of all shift IR instructions and shift DR data.

        For this you will need to know how many devices are in the chain before the device to be programmed and how many after after it. You also need to know the instruction register length (IR) for all of the devices in the chain. Then you calculate how many bits you need to pad the beginning and end of each shift IR instruction by. This is the sum of the IR register length of all of the device that proceed the device and the sum of all of the lengths of the IR register that are after it in the chain. Whenever you send a JTAG command to program the device, you need to make sure that all of the other devices in the chain see a bypass command. The shift DR is a little easier since the bypass command sets the data register length of all of the other devices to a short fixed length. If I remember correctly they are set to a single bit. The data you shift into a device in bypass mode is a don’t care so pad it with 0.

        The problem you may run into is in the programming software itself. _IF_ the Altera, TI, or other device’s programming software does not allow programming a device in a chain then you are out of luck unless you want to intercept the I/O commands from their programming software and pad the data for use in a chain. Someone who knows the Altera and TI software will need to answer that question.
        You may also run into a problem of which hardware their programming software will talk to. If the programming software for all of the parts you want to program can talk to generic hardware and supports chained devices then you should be ok, otherwise you may be able to use a single JTAG chain and programming header but still need to change programmers each time you program a different manufacture’s device.

        Actel’s line of FlashPro programmers can normally program Actel devices in a chain of devices from other vendors and the Xilinx programmers can program Xilinx parts that are in a JTAG chain. I do not believe either programmer will program a part from the other vendor without a lot of work.

    • Jason Vargas says:

      I just recently looked into this and it turns out that the TI (assuming MSP430 in this case) is not fully compliant with the JTAG standard. Therefore it will not work in a chain as you would hope. If it is from another family it may or may not work of course. See http://processors.wiki.ti.com/index.php/JTAG_%28MSP430%29 for more information.

  3. david collier says:

    Also redacted to keep it secret

  4. david collier says:

    Redacted – to keep it super secret!

  5. david collier says:

    Redacted to keep it secret

  6. david collier says:

    Redacted to keep it secret πŸ™‚

  7. david collier says:

    Redacted to keep it secret πŸ™‚

  8. david collier says:

    Redacted to keep it secret πŸ™‚

  9. Jeff Gros says:

    Ni Nigel,

    I’ve been in the habit recently of backing up anything on the net that I found useful, so I spent some time this weekend backing up articles from your stack overflow blog. While I was doing this, I actually reread them all. It was quite fortuitous actually, as I found a little tidbit that I didn’t notice the first time through which will help me with one of my projects at work. Many times I am told something, or read something, and think “well duh!” and move on. Unfortunately, it is often that I don’t truly appreciate it until I come across a situation which it saves my bacon. The human condition seems to put a heavy weighting on first hand experience! πŸ˜‰

    But I digress. My point was that while rereading your articles, I realized that I don’t think I ever saw the embedded systems hardware test document ever released. It was expected to be released within a few weeks, which appears to have turned into 7 months!

    No urgent need on my part. I was just curious and wanted to know what ever happened to it. I’m sure what probably happened is that you’re over your head in work right now. The good news and the bad news is that I’m in the same boat! Feast or famine, as always.



    • Nigel Jones says:

      Yes it’s been an insane year. The HW test requires a lot of work – and I just haven’t had the time to complete it. It will get done when I get some down time. Of course I’ve been expecting to get some down time in a month or so, for the last nine months…

  10. pravin k says:

    I am ME student. I want information about embedded software/hardware testing tools using android.
    Please help me for my ME project.

  11. ashu says:

    I have query, Do have different test environment for testing hardware of different embedded devices or systems??

  12. ashu says:

    I am ME student. I need information about embedded software/hardware testing tools.
    Please help me for my ME project.
    Thank you.

Leave a Reply