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.

Hercules launchpad FTDI problems

Other Parts Discussed in Thread: HALCOGEN

Hello, to test the serial connection, I ran the light sensor -> serial demo application, found elsewhere on TI pages. Both CCS and Halcogen (with Wine) worked flawlessy under Linux. I compiled and downloaded the app to the board, the SCITX led is blinking as expected, and now the problem arises with receiving the data. It should be in the form 0x<light intensity>, and it is indeed received by serial terminals via /dev/ttyUSB0 under Linux... sometimes. Sooner or latter, the stream gets scrambled like that:

0x3772
0x0x3255
0x3885
0x3898
0x0x3224
0x3219
0x2626
0x2808
0x3611
0x3883
92
����������������������������������������������������������������������������p����������������������������������������������

i.e. missing characters and garbage, and then it stops. I tried different settings on both sides, like 9600-8-N-2 or 38400-8-O-1, it all ends up the same. Interesingly, the garbage is outputted for a while even when the reset button is held down.

I tried to test it in Windows, but the board is seen as XDS100 V2, nothing shows in "Ports". Installing the FTDI VCOM driver does not help. Also, manuals like this http://www.ftdichip.com/Support/Documents/AppNotes/AN_119_FTDI_Drivers_Installation_Guide_for_Windows7.pdf do not work with the board. Is your custom version of FT232 compatible with Windows 7/Linux?

Is it possible to alternatively use a generic serial -> usb interface, by connecting to the TX/RX pins of TMS570? The board is useless for me without a serial communication. Would unplugging the USB socket be enough for the two interfaces not to interfere with each other?

  • Hi Keli,

    We didn't see this kind of problem on LaunchPad. It might be caused by the code running in flash or SRAM. The FTDI chip is FT2332 rather than FT232. They are not full compatible. 

    You can use FT_Prog to check the UART/USB port configuration. If you have both FT2332 drivers and FT232 drivers on your PC, please uninstall FT232 drivers, then try the project again.

    Regards,

    QJ

  • As of Windows: I tried it on another machine, this time Windows 8. The newest FTDI driver installed as well, and it does not work. On both devices the board is visible as "Other devices/XDS100 Ver. 2.0". I can not find any other FTDI driver for Windows.

    As of Linux: occasionally corrupt stream as before, CCS almost always works, but rarely can not enter the debug mode:

    CortexR4: Trouble Writing Memory Block at 0x8000678 on Page 0 of Length 0x4: (Error -154 @ 0x0) One of the FTDI driver functions used to write data returned bad status or an error. (Emulation package 0.0.0.0)
    IcePick: Error: (Error -150 @ 0x0) One of the FTDI driver functions used during configuration returned a invalid status or an error. (Emulation package 5.1.507.0)
    Dap: Error: (Error -154 @ 0x0) One of the FTDI driver functions used to write data returned bad status or an error. (Emulation package 5.1.507.0)
    CortexR4: Trouble Writing Memory Block at 0x800067c on Page 0 of Length 0x4: (Error -2130 @ 0x800067C) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 0.0.0.0)
    CortexR4: JTAG Communication Error: (Error -154 @ 0x0) One of the FTDI driver functions used to write data returned bad status or an error. (Emulation package 0.0.0.0)
    CortexR4: GEL: File: /home/keli/workspace/Measure/Debug/Measure.out: Load failed.

    Also, the following is occasionally generated in /var/log/dmesg:

    [ 4409.388590] usb 2-6: USB disconnect, device number 45
    [ 4409.388872] ftdi_sio ttyUSB0: error from flowcontrol urb
    [ 4409.388944] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
    [ 4409.388953] ftdi_sio 2-6:1.1: device disconnected
    [ 4409.621687] usb 2-6: new high-speed USB device number 46 using ehci-pci
    [ 4409.741837] usb 2-6: New USB device found, idVendor=0403, idProduct=a6d0
    [ 4409.741843] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 4409.741846] usb 2-6: Product: Texas Instruments Inc.XDS100 Ver 2.0
    [ 4409.741849] usb 2-6: Manufacturer: TI
    [ 4409.741851] usb 2-6: SerialNumber: TIWZ22NQ
    [ 4409.745950] usb 2-6: Ignoring serial port reserved for JTAG
    [ 4409.749665] ftdi_sio 2-6:1.1: FTDI USB Serial Device converter detected
    [ 4409.749707] usb 2-6: Detected FT2232H
    [ 4409.749710] usb 2-6: Number of endpoints 2
    [ 4409.749713] usb 2-6: Endpoint 1 MaxPacketSize 512
    [ 4409.749715] usb 2-6: Endpoint 2 MaxPacketSize 512
    [ 4409.749718] usb 2-6: Setting MaxPacketSize 512
    [ 4409.750118] usb 2-6: FTDI USB Serial Device converter now attached to ttyUSB0

    It is accompanied by the diode D6 switching off for a while. So, it seems that the connection is unstable on the driver level.

    The code is taken directly from the tutorial...

        adcData_t adc_data; //ADC Data Structure

        adcData_t *adc_data_ptr = &adc_data; //ADC Data Pointer
        unsigned int NumberOfChars, value; //Declare variables
        sciInit(); //Initializes the SCI (UART) module
        adcInit(); //Initializes the ADC module
        while(1) // Loop to acquire and send ADC sample data via the SCI (UART)
        {
            adcStartConversion(adcREG1, 1U); //Start ADC conversion
            while(!adcIsConversionComplete(adcREG1, 1U))
                ; //Wait for ADC conversion
            adcGetData(adcREG1, 1U, adc_data_ptr); //Store conversion into ADC pointer
            value = (unsigned int)adc_data_ptr->value;
            NumberOfChars = ltoa(value,(char *)command);
            sciSend(scilinREG, 2, (unsigned char *)"0x"); //Sends '0x' hex designation chars
            sciSend(scilinREG, NumberOfChars, command); //Sends the ambient light sensor data
            sciSend(scilinREG, 2, (unsigned char *)"\r\n"); //Sends new line character

        }

    Could the board be damaged?

  • I did a bit more testing, and to sum that up:

    - On both Windows 7 & 8, on two separate machines, the stock FTDI driver installer does nothing, i.e. the serial-over-USB device on the board remains as an unrecognised "other device".


    - Installing CCS on Windows suddenly makes the device recognised. The serial communication works then without a glitch.

    - Linux recognises the device out of the box, but the serial communication is buggy: an occasionally corrupted stream and disconnections. Despite that, CCS flashes the device mostly without problems - a stand-alone serial terminal seems to interfere with CCS, though.

  • - When using libftdi in Linux, which replaces the kernel driver ftdi_sio, the communication is flawless. So it might be, that the bug is in the kernel driver.