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.

How to use ftdi2232d jtag for tm4c1294

Other Parts Discussed in Thread: LMFLASHPROGRAMMER

HI,

I was given a schematic that redesigns in-house product from LM3S9B96 to TM4C1294.

Previous the unfinished custom board(LM3S9B)  was developed based on LM3S9b using FTDI2232D for ICDI, and physically connected EK board to the custom board with 2*10 jtag header from PC. So .bin can program from LM Flash -> ek LM3S9B96 -> Jtag connections through 20 pins header -> the target custom board(LM3S9B)


However the redesigned custom board based on TM4C1294 still uses FTDI2232d unlike a schematic given from TI. I assume the person who designs the new custom board does not use a chip for ICDI on EK-TM4C1294. Also it has the 2*10 jtag header as same as LM3S9B96. I don't know why he did.


I am not sure how I can program .bin to the target custom board(Tm4c).

Does it get through LM Flash ->USB->EKTm4c1294->jtag connections(thru 2*10 header) -> target board to program .bin?

How Can I get debug messages from the target board to my PC? . The ICDI interface schematic is exactly identical with LM3S9B96. It separates usage of ChA/B. Ch A is used for JTAG(MPSSE?) and Ch B is used for Virtual com Port.

Are the debug messages coming from USB ? unlike programing .bin? (target board -> usb ->uart -> my PC)

Jin

  • Hello Jin

    You can still use the FTDI2232D chip in the same manner as with the LM3S devices. The Channels for UART and JTAG are separate on the multichannel FTDI device.

    Regards
    Amit
  • So, do programming .bin from LM flash to the target board via EK LM3S and sending debug messages from the target board to my pc use different routes? one is Jtag connection the other is usb cable?

  • Hello Jin

    The physical pin from FT2232 to TM4C are different. Between FT2232 and PC it is one physical line with logical channels for data exchange

    Regards
    Amit
  • HI Amit,

    Is that the correct layout of what you said?

                                                                                                                  FT2232

    PC(LM Flash, terminal program...) ----- USB ------------ CH A (JTAG/SWD) ---------|      T      |

                                                                                            |                                                          |      M     |

                                                                                            |-------CH B(Virtual Com Port) ---|      4     |

                                                                                                                                                        |      C     |

    I found that the previous guy connected LM3S to another target board by the mode of ICDI out to JTAG header.  If I want to use the above mode with TM4C, I need to physically wire up PA0 ~PA7(TCK,TDI,TDO...) with the target board. Is that right?

  • Hello Jin,

    There is only one USB cable that connects to the FT2232. And yes, you would need to wire PA0-PA1 of TM4C for UART and PC0-PC3 of TM4C for JTAG

    Regards
    Amit
  • Hi Amit,

    Here is a schematic,which is same as LM3S9B, for ft2232d on the new custom board based on TM4C.

    According to the schematic, Ch A is for JTAG/SW and Ch B is for Virtual Com port.

    I have tried to set up FTDI2232d on the new custom board using FT_Frog, but it has not worked so far.

    How I configure using FT_Prog is:

    I have tried on D2XX Direct and VCP but nothing works.

    For the Port B, I select Virtual Com Port for Driver and 232 UART for the hardware.

    As I program .bin into the custom board it still says "Unable to find a target"

    I am not sure if you can help since this is more likely to be FTDI side.

    Thanks,

    Jin

  • Hello Jin

    I think Channel A has to be set to 245FIFO with D2XX drivers and Channel B to UART with VCP drivers to true

    Regards
    Amit
  • Hi Amit

    I chose Custom VID/PID  as a FTDI default and chose self-power since an external 5V power supply is connected.

    I have changed it as you suggest but it is still same "unable to find a target".

    Thanks,

    Jin

  • So what I did was read LM3S9B96 config thru FT prog and applied it into the tm4c custom board.
    Of course I selected "self-powered" for the custom board, but it's still same.

    Thanks,
    Jin
  • Hello Jin,

    Can you take a dump of the XML file that FT Prog has and attach?

    Regards
    Amit
  • Hi Amit,

    Here is my FT prog .xml file, which is mostly same as LM3S9B96


    Thanks,

    Jin

    ft2232d_LMI.xml
    <?xml version="1.0" encoding="utf-16"?>
    <FT_EEPROM>
      <Chip_Details>
        <Type>FT2232D</Type>
      </Chip_Details>
      <USB_Device_Descriptor>
        <VID_PID>1</VID_PID>
        <idVendor>0403</idVendor>
        <idProduct>BCD9</idProduct>
        <bcdUSB>USB 2.0</bcdUSB>
      </USB_Device_Descriptor>
      <USB_Config_Descriptor>
        <bmAttributes>
          <RemoteWakeupEnabled>false</RemoteWakeupEnabled>
          <SelfPowered>true</SelfPowered>
          <BusPowered>false</BusPowered>
        </bmAttributes>
        <IOpullDown>false</IOpullDown>
        <MaxPower>500</MaxPower>
      </USB_Config_Descriptor>
      <USB_String_Descriptors>
        <Manufacturer>LMI</Manufacturer>
        <Product_Description>Stellaris Evaluation Board</Product_Description>
        <SerialNumber_Enabled>true</SerialNumber_Enabled>
        <SerialNumber />
        <SerialNumberPrefix>0A</SerialNumberPrefix>
        <SerialNumber_AutoGenerate>true</SerialNumber_AutoGenerate>
      </USB_String_Descriptors>
      <Hardware_Specific>
        <Port_A>
          <Hardware>
            <UART>false</UART>
            <_245FIFO>true</_245FIFO>
            <CPUFIFO>false</CPUFIFO>
            <OPTO>false</OPTO>
            <HighIO>true</HighIO>
          </Hardware>
          <Driver>
            <VCP>false</VCP>
            <D2XX>true</D2XX>
          </Driver>
        </Port_A>
        <Port_B>
          <Hardware>
            <UART>true</UART>
            <_245FIFO>false</_245FIFO>
            <CPUFIFO>false</CPUFIFO>
            <OPTO>false</OPTO>
            <HighIO>false</HighIO>
          </Hardware>
          <Driver>
            <VCP>true</VCP>
            <D2XX>false</D2XX>
          </Driver>
        </Port_B>
      </Hardware_Specific>
    </FT_EEPROM>

  • Hello Jin,

    Can you change the programmation in XML to the following

    <SelfPowered>false</SelfPowered>
    <BusPowered>true</BusPowered>

    Also once the EEPROM on the FTDI is programmed, did you power cycle the same and then check the device manager?

    Regards
    Amit
  • Hi Amit,

    The reason why I chose the "self-powered" is the custom board is powered by an external 5V supply. Anyhow I changed as you said and tried.

    After programming config into eeprom, I did "cycle ports" in FT Prog(Program devices).

    Then, unlock the device using LM flash

    Here is what the device manager shows:

    Then I was trying to program MAC address, but LM flash says "unable to initialize target -0".

    Thanks,

    Jin

  • Hello Jin,

    Are you able to erase, do empty flash check? What is the configuration tab looking like?

    Regards
    Amit
  • Hi Amit,

    I guess you were talking about LM Flash. As you see the below capture I tried to erase flash, but it says "unable to initialize target -0"

    Thanks,

    Jin

  • Hello Jin,

    OK, then we need to go the scope route. Can you check with a scope/LA if the JTAG signals are coming out as expected when LMFlashProgrammer is used for any operation?

    Regards
    Amit
  • Hi Amit,

    I checked pin 1(TDI),5(TMS),9(TCK) in JTAG/SWD header since the custom board has 2*10 jtag header.
    I could see some signal go through, but not TDO and SRSTN.

    The one thing I wonder is TDI stays high(3.37v) although any signals(actions) do not go out of the LM Flash. Still  TDI corresponds with JTAG signals come out of LM Flash but it just stays high all the time.

    Thanks,
    Jin

  • Hello Jin

    And was this with the Unlock Sequence? Or did you try to do a Flash Blank Check?

    Regards
    Amit
  • Hi Amit,

    First thing I did was unlock the debug port under other utilities in LM Flash. It seemed to work ok as it showed captured message above like "power cycle board to complete~~"
    Then testing erase Flash and Flash black check gave me a same error like "unable to initialize target -0"

    Thanks,
    Jin

  • Hello Jin,

    I would expect that the Unlock sequence and the scope showing TDI and TDO not toggling are OK as the unlock sequence requires TCK-TMS. On the other hand something as Flash Blank check must use all 4 lines.

    Regards
    Amit
  • Hi Amit,

    After unlocking debug ports, I turned off the power on the custom board, then executed hardware reset through LM Flash.

    Now I can program MAC address as well as .bin into the custom board.

    I wonder turning off the custom board's power and hardware reset through the LM Flash once the unlock sequence is done are necessary processes?


    Thanks,
    Jin

  • Hello Jin,

    The custom board only has the FTDI. The Unlock sequence power switch off is required for the TM4C to recover but not the custom board.

    I had already asked if you power cycled the custom board after EEPROM programming!!!

    Regards
    Amit
  • Hi Amit,

    I misunderstood the meaning of "power cycle" as you mentioned it. I thought it meant to do "cycle ports" using FT Prog since I was handling FT Prog at that time.

    Sorry about my misunderstanding .

    I appreciate your support sincerely.
    Jin
  • Hi Amit,

    The one thing that I have noticed from the custom board is that the below schematic from LM3S9B96 is designed as for "BUS POWERED", but the previous guy disconnected pin 1(5v) of J13(USB interface) with +5v since an external 5v power supply is connected.

    I guess he thought the custom board is sourced by the external 5 v power ,so disconnecting 5V from pin1 of USB interface by modifying LM3S9B's ICDI schematic.

    Every time I change the configuration of FT Prog to test something and go back to the config that worked well before, I still hit the "unable to initialize target -0" error although I did power cycled several times.

    It ends up working after rebooting computer and power cycles a couple of times. I am suspicious about the hardware configurations(schematic) of the custom board.

    The custom board uses the external 5V power but its schematic seems not to go along with "SELF POWERED". It is more likely "BUS POWERED" except disconnection of 5V from Pin1 of USB interface

    Is that the reason working erratically?

    Thanks,

    Jin

    Jin

  • Hello Jin,

    It could be that way. We have always kept the used Bus Powered and designed the schematic to be Bus Powered, with a jumper option to power the main MCU separately if current requirements are too high.

    Regards
    Amit