Menu

#11 new ToolStick USB:TS000011C0

open
None
5
2007-04-13
2007-04-11
emm kay
No

just got this tool stick a couple of days ago from the embedded conference in San Jose.

lsusb output
Bus 002 Device 008: ID 10c4:8253 Cygnal Integrated Products, Inc.

added the USBID to
ec2tool/ec3adaptors
ec2drv/ec2drv.c:open_ec3()

recomipled and now it is recognized
cool

----------------------- output
ec2device --port=USB
*********************************************************************
* WARNING: Auto detection of mode may cause initialisation sequence *
* to differ significantly from the SiLabs IDE. *
* In the case of problems specify --mode=C2 or --mode=JTAG *
*********************************************************************

ec2_reset C2
EC3 firmware version = 0xff
Warning: this version is newer than the versions tested by the developers,
Please report success / failure and version via ec2drv.sf.net
id=0x65, rev=76
ERROR: attempt to write to reserved flash area!
ERROR: attempt to write to reserved flash area!
unique_id=0x76, rev=00
FOUND:

device : Unknown
mode : JTAG
Flash size = 0 bytes
Internal xram size = 512 bytes
External bus = No
Single lock addr = 0x0000
Flash sector size = 8196 bytes
Flash reserved top = 0x0000
Flash reserved bottom = 0x0000
Has Scratchpad = No
Has paged SFR = No
USB FIFO size = 0 bytes

Tested = No

Support for this device has not been fully tested or may not be complete
You can be of assistance, please visit:
http://sourceforge.net/tracker/?atid=775284&group_id=149627&func=browse
Please feel free to report your succcess / failure.
If there are any issues we can probably resolve them with your help since we don't have boards for every supported processor.
exiting now
disconnect done

Discussion

  • Ricky White

    Ricky White - 2007-04-13
    • assigned_to: nobody --> rickyw
     
  • Ricky White

    Ricky White - 2007-04-13

    Logged In: YES
    user_id=22723
    Originator: NO

    Hi,
    Looking at the output you provided either they have changed the protocol a little or the Target wasen't connected.
    Can you please confirm the type of the target processor that was connected at the time.

    The "EC3 firmware version = 0xff" usually indicates things arn't too happy.
    This is normally a low number, currently 0x0c or 0x0d for USB debuggers.

    The "unique_id=0x76, rev=00" seems to indicate a Si8250-IM Device. This is currently not enabled in the device table because The datasheet dosen't have much information on it. This is why the reported processor information is garbage.

    I guess if you have a processor that is in the device table connected and it still comes up with the EC3 firmware version = 0xff then a data caputre of the USB communications between the Silabs ide and toolstick would be use (just the connection part). using usbsnoop or one of its derivitives.
    I doubt they would have changed the protocol much.

    Another useful data capture to look at is run ec2device with the debug option. This shows the communications between ec2drv and the debugger.
    ec2device --port=USB --debug

    Thanks for the information.

    Ricky

     
  • emm kay

    emm kay - 2007-04-14

    Logged In: YES
    user_id=575731
    Originator: YES

    Ricky,

    yes, the device was connected.

    The other nite I attempted the EC3.
    I stumbled across that the complain 'unknown device', which made me curious and I understood
    this is already well tested. I looked deeper
    and I realized the id and unique_id are different (unique_id=0xXX, rev=YY) every time I execute
    ec2device. It seems it does not reliably find the communicate with the device.

    Afterall it actually shows a very similiar behaviour with the Toolstick.

    I am running Fedora Core 6. For ec2 tools I installed libusb-0.1.12-5.1 and libusb-devel
    Let me know if you need more info.

    Matthias

     
  • Ricky White

    Ricky White - 2007-04-14

    Logged In: YES
    user_id=22723
    Originator: NO

    Hi Matthias,

    Yes the device detection seems to be quite reliable here and others have reported it worked for the EC3 but there had been some reports of incorrect identification that was fixed in the last few weeks in CVS.

    I guess it would be good to figure out why ec2drv doesn't reliably detect targets on your EC3.
    Once this is stable i guess the toolstick will work as others have reported some toolsticks to work.
    Once I see a dump from a toolstick like yours work correctly to identify a target then I'll put the USB device id you got into CVS.

    I'm now running FC6_x86_64 (upgraded from FC4 last weekend).

    I take it you are running the code from CVS, the code from the download area is really old.
    I need to do a new release sometime to update the code in the download area.

    Is the EC3 firmware version reported correctly on your system for your EC3 or does it come back as 0xff too?

    is the detection correct if you use
    ec2device --port=USB --mode=C2
    or
    ec2device --port=USB --mode=JTAG
    as approprieate for your target? Since the auto detection is somthing that ec2drv does that the silabs ide dosen't do I'm always suspicious of it.

    It would be good to get a dump of the output of
    ec2device --port=USB --debug > log.txt
    of your EC3 when if gets the wrong ID (running latest CVS code).

    Looks like you are running the same libusb as me so hopefully we can track down the issue reasonable easily.

    Thanks,

    Ricky.

     
  • emm kay

    emm kay - 2007-04-17

    debug output

     
  • emm kay

    emm kay - 2007-04-17

    Logged In: YES
    user_id=575731
    Originator: YES

    Ricky,
    Sorry took a couple of days to create the output.

    The test output was generated with cvs sources from 2007-04-08.
    (I verfied the same behaviour with cvs from today 207-04-16)

    One thing I noticed it that a re-run shows different data on the next run.
    I attached multiple runs in the logfile. maybe it helps
    and you can 'read between those lines'.

    It happened once and it recognized the correct chipset F327 (for the toolstick),
    See test out 6.a)
    Other runs you will show a different processor is recognized.

    Hope that helps. Let me know if you need more data.

    Matthias

    File Added: ec3AndToolstick

     
  • Ricky White

    Ricky White - 2007-04-21

    Logged In: YES
    user_id=22723
    Originator: NO

    Hi Matthias,

    Thanks for the data captures.
    Sorry about the delay I've been busy and my internet connection has been unstable for the last few days ( need to get my phone line fixed) so I thought while its working I would give you a progress update.

    I've had a quick look and it seems as if ec2drv on your system reads back different values from the ec3 bootloader than what is expected. especially the version line.
    The ec3 dump of the conenct looks nearly normal
    ec2_reset C2
    TX: 03 00 00 00 RX: 01 02 << Debugger bootloader version 0x02 (same as mine)
    TX: 03 01 0c 00 RX: 01 00 << Set debugger flash sector 0x0c ok (same as mine)
    TX: 03 06 00 00 RX: 01 02 << Version expected where 02 is. I get 0x0c which matched the silabs ide.
    This failing within the first 3 opperations is strange. maybe I'm doing somthing that libusb dosen't like.

    On the toolstick it seems to read 0x00 where the length of the reply packet should be shifting the length over by one and we then don't get the expected version byte.

    I'll get back to you when i've looked into it a bit more.

    Thanks
    Ricky

     
  • Ricky White

    Ricky White - 2007-04-28

    Logged In: YES
    user_id=22723
    Originator: NO

    Hi Matthias,
    I've finally found some time to look at your dumps in more detail.
    After looking at your traces I looked at the USB code again and decided it needed better error checking and reporting. I have added this to CVS which should provide more information to debug the issues you see.
    I have also altered the USB initialisation sequence a bit as I had made a few errors which might help things also.

    Toolstick
    ---------
    firmware = 0xff is an error from read_usb_ch which in turn is from
    usb_interrupt_read in libusb. read_usb_ch returns -1 on failure and this is
    getting reported as the firmware revision.
    ec2drv USB error handling needs looking at.

    Most likley the 1 second timeout in read_usb.
    Can you confirm please this by running the latest CVS code?
    Seem to read totaly unexpected data.
    Maybe Silabs changed the boot protocol for this toolstick?
    Is it possible for you to capture the connect sequence of the SiLabs IDE to this
    toolstick under windows using snoopy pro or similar?

    EC3
    ---
    All of you EC3 tests return 2 as the firmware version.
    This is unexpected.
    There is something funny on my system too.
    There is some circumstances it misdetects my F310 as an F010.
    This is after trying to access the debugger with the micro powered off.
    I need to look into this as it looks like the USB is not being initiallised
    correctly in this case.

    Ricky

     
  • Ricky White

    Ricky White - 2007-11-24

    Logged In: YES
    user_id=22723
    Originator: NO

    Hi,
    I have been looking at a debug capture of silabs talking to one of these debuggers and I now know why they don't work. The fix is relativly simple because the difference appears to be that these toolsticks don't have the bootloader in them, just the application. I have modified ec2drv to support these toolsticks but I cannot test as I don't have one. The changes are not in the SVN trunk

     
  • emm kay

    emm kay - 2007-11-26

    Logged In: YES
    user_id=575731
    Originator: YES

    Ricky,

    I am more than happy to give your changes a try. send me a copy (or diffs).

    Last week (prior to your post) I looked at the toolstick myself again.
    started out with the latest from svn and added
    EC3_PRODUCT_ID2 0x8253
    plus i had to remove open_ec3() usb_release_interface(). Looks like the toolstick
    it more picky and only allows 'release' after a sucessful 'claim'

    One of the things I noticed was that the toolstick does not provide the endpoint 2.

    e.g. lsusb -v -s 2:7 showed the details

    I changed the ec2drv source to use endpoint 1 and things progressed a little further,
    though still getting errors.

    src/ec2tools/ec2device --port=USB --mode=C2 --debug
    0x10c4, 0x8253
    can we talk to it?
    0x0000, 0x0000
    0x0000, 0x0000
    0x0000, 0x0000
    0x0b97, 0x7761
    0x413c, 0xa005
    0x0000, 0x0000
    0x0b97, 0x7762
    ec2_reset C2
    TX: 03 00 00 00
    /home/mattes/src/cygnal/ec2drv/src/ec2tools/.libs/lt-ec2device:ec2drv.c:1893:
    usb_interrupt_write in write_usb returned -2 : No such file or directory
    exiting now
    Matthias

     

Log in to post a comment.