IOW56 SPI transmission: not all bytes are read

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

wayoda
Posts: 362
Joined: Fri Dec 19, 2003 12:00 pm
Location: Wuppertal/Germany

Post by wayoda »

Problem seems to exist with IIC mode too.

No Problems writing to LedMatrix (I don't have one but at least the writes work)

What about :
Problem exists only if the IOWarrior has to return a report for a Special-Mode command?
Eberhard
lgzco
Posts: 10
Joined: Tue Mar 13, 2007 10:23 am

Post by lgzco »

Hi Eberhard, Hi Robert,
Updated: Special Mode $FF tested and it fails.
Problem seems to exist with IIC mode too.
as I understand so far, the problem is due to the IoWarrior56 itself, but not the iowkit.dll. Is my interpretation correct ?

Is there any workaround for this problem ?

Many thanks for your enthusiasm and effort so far !!!

Regards,
Ligang
wayoda
Posts: 362
Joined: Fri Dec 19, 2003 12:00 pm
Location: Wuppertal/Germany

Post by wayoda »

Hi Ligang,
lgzco wrote: as I understand so far, the problem is due to the IoWarrior56 itself, but not the iowkit.dll. Is my interpretation correct ?
Yes, We were able to reproduce the error with other librarys. (And on Linux too!)
Is there any workaround for this problem ?
Yes. The problem is introduced by the writes to the IOW56. This is what actually fails, the problem that you are unable to read back the data seems to be a side-effect only.

Workaround
Just sleep for a short time after you have written an SPI-report to the device.
I ran some python tests and putting in a
time.sleep(0.001)
after each (SpecialMode)-Write() made the problem go away.
Sleeping for 1 millisecond is just a rough guideline. The problem did already go away in my C-code when I slept for 50 nanoseconds.

BTW: Only the SpecialModes of the IOWarrior are affected. There seems to be no problem with the plain IO commands.


Eberhard
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

As of now we are not sure what causes the problem. We will do an in depth debugging soon to pinpoint where the problem comes from. It seems like differences between OHCI and UHCI host controllers are involved.
Last edited by Guido Körber on Thu Apr 26, 2007 12:39 pm, edited 1 time in total.
Robert Marquardt
Posts: 543
Joined: Mon Dec 01, 2003 6:09 pm

Post by Robert Marquardt »

Workarounds are:
Sleep for some msecs between consecutive IowKitWrite calls. This limits the throughput on the SPI though.
Buy a USB PCI card. Almost all have OHCI host controllers. The problem seems to only surface on UHCI host controllers.
If you decide to buy such a card then insist on one with NEC chip. http://www.usbman.com recommends them.
lgzco
Posts: 10
Joined: Tue Mar 13, 2007 10:23 am

Post by lgzco »

Buy a USB PCI card. Almost all have OHCI host controllers. The problem seems to only surface on UHCI host controllers.
If you decide to buy such a card then insist on one with NEC chip. http://www.usbman.com recommends them.
If this PCI card is used, how about the SW complexity to control the SPI transfer ?

Regards,
Ligang
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

Using an extra USB card is not the official recommendation for a bug fix...

Though for now it seems to be one way to work around the problem. We are going to look for a real fix though.

Using another USB host controller is not going to add any complexity for you. It works the same as with the motherboard controllers. Any motherboards with USB 2.0 support already have multiple host controllers, adding one more makes no real difference.
lgzco
Posts: 10
Joined: Tue Mar 13, 2007 10:23 am

Post by lgzco »

Hi Guido, Hi All,

Is there any new information about the bug fix? Are you definitely sure that the problem does come from the chip ?

thanks in advance !

Ligang
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

Sorry for the delay.

No news so far, we could not yet pinpoint where this effect comes from. Due to vacations and some other projects we will have to postpone this a few more weeks. We will definitely go into this issue in July.
A542398
Posts: 1
Joined: Tue Oct 02, 2007 4:36 pm

Post by A542398 »

Hi All,

Is there any new Infomation about the Bug? Is it fixed?

Cheers
Torsten
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

Sorry, still under investigation. Right now we are shorthanded in the software department.
Post Reply