This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Program Hercules TMS57012 custom PCB with launchpad

Other Parts Discussed in Thread: LAUNCHXL-TMS57004, TMS570LS0432, SEGGER, TUSB3410

Hi,


Is it possible to program a Hercules on a custom pcb with a Hercules launchpad? How can this be achieved? Thank you

  • I have access to these pins on the custom hercules board: GND, 5V, 3v3, 1V2, HERCULES_LIN1_TXD, HERCULES_LIN1_RXD, HERCULES_NTRST, HERCULES_RTCK, HERCULES_NRST, HERCULES_MR_PB, HERCULES_TDI, HERCULES_TDO, HERCULES_TMS, HERCULES_TCK, and many other pins.
  • Hi Edwin,

    So you're custom board is fine, but the Hercules launchpads are not designed to be used as emulators even though the emulator is embedded.

    It could be made to work, but I think you'd wind up 'sacrificing' a launchpad to do it properly.    The LAUNCHXL-TMS57004 launchpad has a 14 pin JTAG header and you could probably remove the TMS570LS0432 from that board,  solder in a header, and rig an emualator up but you would need to adapt a few of the pins.

    Our JTAG pinouts really are not 'symmetric' - even though they look that way there is a target-side and an emulator side variation on a few pins.
    For example the target should provide power on the "presence detect" pin but the emulator should sense the voltage on PD and drive the outputs based on this.
    There is also one pin on the launchpad that is defined as a ground but is instead pulled up.   We use this to detect when someone plugs in an external emulator and the external emulator being attached makes this pin transition from 'pull up' to 'low' .. the on-board emulator can sense this and get off the bus to avoid conflicting w. the off-board emulator.   So those differences break the symmetry between emulator side and target side JTAG headers.   On the Hercules launchpads, we have the 'target side' ... to use as an emulator you'd need to hack the board to make it look 'emulator side'.


    The simplest thing for you to do would be to buy an XDS100v2 -  or build one depending on your needs.   You can find the 100v2 from a variety of vendors.  The design is available on the TI embedded processor wiki page.    For just 1 unit it would be cheaper to buy one unless you can get a PCB made for < $~20.

  • Oh, okay. Is there any other way to program the Hercules? Thank you
  • Hi Edwin,

    No - you at least need to begin by downloading some program through JTAG because a part is shipped with flash erased and there isn't any ROM bootloader or hardware boot-mode. A completely generic JTAG tool that doesn't know about Hercules won't work either, because you have to have the tool download the flash programming algo to RAM and then pass it the data to program... a lot of steps go on behind the scenes when you're using one of the XDS probes.

    I'd suggest an XDS100v2 for starting out - I checked and they're selling on eBAY for $40. The design is freely available processors.wiki.ti.com/.../XDS100 as well but it'll cost you almost as much to build as to buy.

    Unless you have access to a probe like a Segger J-LINK etc. If you have access to something in that category - we can figure out if it knows how to program a Hercules part.
  • Oh okay thank you. The one I see on ebay, www.ebay.com/.../281487721162;chn=ps, does VD go to 3.3V and does EMU0 and EMU1 go to TX and RX but what about the key? Thank you
  • If I were to hack the hercules and basically bring out the wires JTAGwires, serial, and NRST, will it be fully functional? Is the serial wires and reset needed or just useful for code composer to function?
  • Hi Edwin,

    You need: TRST\, TCK, TDI, TDO, TMS, RTCK (good to have). If there is an SRST\ pin (note - NOT the same as TRST) then you can connect this to nPORRST which is handy - it will let you assert a power on reset to do things like clear the 'Err' light -- but you could do this with a pushbutton on your board as well.

    It is likely that EMU0/EMU1 are not UART capable. They are not on the reference design that we posted on the processor wiki. Instead these pins get used for things like external cross-triggering (say if you have multiple processors - you can make them all halt/startup together). But Hercules doesn't have EMU0/EMU1 - this is mainly something you find on other TI processors like DSPs.

    So I would plan for a standalone UART channel.

    If you want an older style DB-9 UART jack you could put one of these chips on your board:
    www.ti.com/.../getliterature.tsp;fileType=pdf

    If you want a USB based UART you could look at TUSB3210 or TUSB3410 which are full speed USB-UART chips.
  • Thank you, maybe in the next version I'll consider it. I got it to temporarily work by hacking the hercules launchpad and removing the hercules. The only slight problem now is noise since it only seems to work when I spread the wires apart. Maybe I'll try adding some ground lines in between each line, so I won't corrupt it. What is the worst thing that can happen if something changed while sending and the flash is messed up? Thank you
  • Hi Edwin,

    Yes - current travels in a loop! you can twist together a signal and ground wire for best results.
    You could take a piece of CAT5 cable and see how the pairs are twisted. If you use one for signal and the other for GND that'll give you a good result...

    In this case if you focus on TCK that will have the most impact. The other lines can ring a lot but as long as they 'settle' before the TCK edge everything should work fine.

    You don't want a problem during programming - you could lock yourself out of the device for various reasons.