Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

programming a maxim device with the USB blaster

Hello,

I want to program the MAX16046 powersupervisor from MAXIM through JTAG with the Altera USB blaster.

The MAX16046 has configuration software which can generate a .svf file.

Next, I used the SVF2JAM utility from Altera to convert this .svf to a .jam file, which can be used with the Altera programmer.

Maxim also provides a .bsdl file for the MAX16046 device. And, having this, i have imported this file into the Altera programmer.

And then the problem arises: When I connect my board to the usb blaster, the programmer finds the device in the JTAG chain (using the scan chain command), but he says: unknown device ID, and I cannot program the MAX16046.

Although, I have checked the ID in the .bsdl file, and the reporterd ID of the programmer, and they are exact the same...

So now I am wondering, if it is at all possible to program a NON-Altera device with the Altera USB-blaster.

Any suggestions.

Thank you,

Tim

7 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Did you solve this problem? If you are still stuck trying to configure your maxim chip with the USB blaster, I can have a go at configuring non-altera devices myself to work out the steps needed, and any possible caveats.

    I don't have any JTAG-compliant maxim devices, but plenty of atmel, xilinx, lattice chips to test.

    BuriedCode
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello,

    No, I did not yet solve this problem...

    I have contacted maxim, but they gave me the solution I already tried, and which didn't work...

    This is de reply I got:

    there are two things you will need:

    |

    | download the altera svf2jam utility:

    | https://www.altera.com/support/software/download/programming/jam/ (https://www.altera.com/support/software/download/programming/jam/)

    | dnl-svf2jam.jsp

    | download the max16046 bsdl file:

    | http://www.maxim-ic.com/tools/bsdl/max16046_tqfn.bsd (http://www.maxim-ic.com/tools/bsdl/max16046_tqfn.bsd)

    |

    |

    | then follow these steps:

    |

    | using the svf2jam program, convert the svf file from our ev kit

    | software into a jam file.

    | launch the quartus ii programmer

    | click add device…

    | in the select devices dialog, select import…, and choose the bsdl

    | file for the max16046. put a checkmark next to the device and

    | click ok.

    | select the device on the list and click add file…, and choose the

    | jam file you just created with the svf2jam utility.

    | program as you usually would.

    But like I said, I tried this and it didn't work, the quartus programmer didnt recognize the ID of the device.

    Thx for helping me!

    Tim
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi there,

    Sorry for the late reply...internet died for a few days.

    The first possible problem could be communication. Different chips have different pin specs, meaning the JTAG lines may need extra pull downs (or even pull ups in some cases), I would check your chips datasheet for that.

    If you use the JTAG chain debugger in Quartus 9.0 programmer, you can scan the chain and it'll tell you the IDcode its read from the chip - which is useful for showing any errors or bad connections. A 0xFFFFFFFF means the TDO line is held high, 0's means its low, and if the IDcode changes every time you scan then there is some clock skew or noise on the JTAG lines.

    The second problem could simply be Quartus programmer not behaving. I have tested my USB blaster with various non-Altera IC's and there seems to be two ways of doing it. The first is as you have tried, adding a device by its BSDL file,which contains the ID code of the device, its instruction length and various other chip-specific things.

    The second method is similar, but involves you adding the above information manually. This is the only way I have succeeded with getting the USB blaster to communicate with other vendors' devices.

    On the left hand side, click 'Add device', scroll down the 'device family' column to 'User defined' (second from the bottom in Quartus programmer 9.0). Once that is highlighted, on the right hand should be a list of any devices you have previously added. Click 'new' on the right, then give it a name, the instructon length and ID code. I have included a *.jpg file to show what it should look like for a generic device. - note: the IDcode is given as a hexadecimal number, whereas in the BSDL file, its binary... for your device:

    Instruction length = 5

    IDcode = 0x00001197

    IDcode mask = 0xFFFFFFFF

    If the above doesn't work, try the mask 0x0000FFFF - that is if your chip has a different 'version' to the one in the BSDL file - that means it just checks the ID of the device, and the manufacturer.

    All the above information is in the BSDL file, the link for which you provided.

    If all goes to plan, next time you scan, the name you gave the chip should pop up in Quartus, then you can add your jam file.

    I assume the SVF2JAM will work with maxim's SVF files since they suggested its use...it doesn't like lattice, or even some Xilinx SVF generated files so I had to knock up my own utility.

    Hope that helps, 9/10 times its a hardware error, either noise on the lines, wrong pull down resistors, or a broken PCB trace, but software problems are just as annoying. Thankfully, Quartus programmer seems pretty stable to me.

    Scott.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello again,

    And thanks for the reply!

    Following your directions, I managed to get the device recognized by the usb blaster.

    But when I want to add the jam file (made with the svf2jam utility): The quartus programmer says this:

    "Cannot open file ...max16046.jam. See System tab (Messages window) for details"

    But in this messages window, nothing appears...

    So probably there is something wrong with my generated jam file.

    Any suggestions?

    Thx,

    Tim
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi again,

    I have recieved that error many times. I have gone through various generated *.jam files, and have yet to work out what to do about it. You are correct, there is something wrong with the generated file. And yes, it IS annoying when it says 'see message window for details' and yet, no message appears.

    So, options:

    1) Email Altera directly, or post in a different part of the forum about the svf2jam utility and why it refuses to accept certain SVF files. especially when maxim specifically suggest its use (which implies they themselves have tested it).

    1a) Email Maxim :)

    2) Use a different programmer. This isn't an ideal solution, but the lattice ispVM software (available as a standalone utility) can play SVF files directly. It will only work with lattice cables though. If you have a parallel port on your computer, the circuit for the JTAG dongle is pretty simple - although its still a hassle to knock up a small circuit JUST for programming one chip. Xilinx has impact software, again, uses a simple parallel port dongle and can play generic SVF files.

    3) Post your SVF file, and I'll see if anything is there which gets ignored by the SVF2JAM utility (which seems to get really arsey with many forms of SVF file)

    4) Post your generated *.jam file, and I'll go through it to see if anything could throw an error. By rights, we shouldn't have to manually edit the generated file, but you never know.

    5) Use an open source utility such as urjtag, or openOCD, which can both work with the USB blaster, and have SVF file players. Bypassing the need for converting the SVF to JAM. Its a command line utility, which can be integrated into various enviroments - I have found it very difficult to use, but then again, I am a GUI person, who likes nice buttons to click :)

    6) If you are really stuck, a while ago I worked on a simple SVF player, able to work with various generic USB-JTAG interfaces, including the Altera USB blaster. I abandoned it, because I have never written a high level language program before, so it was a steep learning curve. But I did get quite far with it, and it 'seemed' to be able to read any version of the SVF specification (so it worked with every SVF file I tried). I'm not just being 'nice', since I need it anyway, and this would be an excuse to re-animate the project.

    Sorry for flooding you with idea's, but options are always a good thing. All depends on how urgent this is, and how savy you are with knocking up hardware. Plus, I can sympathise with how annoying this is.

    Buriedcode.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hey,

    In attachment you can find my .svf file, and my generated .jam file. In the meanwhile I am going to try with the opensource utilities.

    Thx for the help!

    Tim
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I have checked your SVF file - looks quite neat, and abides by the standard well.

    As for the jam file,its a literal translation of the SVF file, and so, looks fine as well.

    I did a check on the Altera knowledge base, and there is a small, but significant caveat with regards to Quartus II programmer:

    http://www.altera.com/support/kdb/solutions/rd05072004_1171.html?gsa_pos=2&wt.oss_r=1&wt.oss=non-altera

    Specifically the wonderful part: you can not use the quartus ii software to program non-altera devices.

    Bummer.

    No wonder I've had some much trouble. A guess it checks the ID code of the device (which for you, you have added manually) and if its not an Altera part, it won't let you add any form of programming file...I guess they allow for non-altera devices to be in the chain, purely so you can bypass them, and configure their devices.

    So, it looks like using the USB blaster with Quartus to for your maxim device is out! Wonderful.

    If you have no luck using urjtag, or openOCD, then I itnhk the only way to configure your maxim device would be to knock up sometihng like this:

    http://www.students.tut.fi/~leinone3/dcn2692/ispcable.png (http://www.students.tut.fi/%7eleinone3/dcn2692/ispcable.png)

    You can ignore the ispEN and reset lines. And perhaps even the buffer itself...I have just used resistors before, straight from the parallel port.

    In the meantime, I'll keep working on my code :)