I'm testing the SUB-20 module in Linux with the provided sub_app application.
When using the GPIO functions (config and read) they fail most of the time with error code 7, "Bulk write failed".
Approx. every 10th call is successful.
ADC and I2C calls work perfectly.
Version information:
XDimax LTD, V0.1.6, Sep 16 2010 12:05:54
DLL/Lib: 1.0.0.18
Driver : 0.0.0.0
SUB-20 : 0.2.2
Boot : 0.5
Any ideas?
Thanks.
GPIO operations fail with "Bulk write failed"
Moderator: serg
Re: GPIO operations fail with "Bulk write failed"
What about other functions?
Do they also fail?
What Linux do you use?
Do they also fail?
What Linux do you use?
Re: GPIO operations fail with "Bulk write failed"
The functions for configuring and reading AD-converter work without problems.
Also I2C functions and writing on the LCD work correctly.
I haven't tested PWM or SPI.
I'm running Ubuntu 9.04 with libusb-1.0-0 version 2:1.0.0-1.
Also I2C functions and writing on the LCD work correctly.
I haven't tested PWM or SPI.
I'm running Ubuntu 9.04 with libusb-1.0-0 version 2:1.0.0-1.
Re: GPIO operations fail with "Bulk write failed"
Are GPIO connected to target?
Try to disconnect everything for the test.
If it is not working please run it with trace enabled:
export SUB_DEBUG=10
and send us a trace.
Try to disconnect everything for the test.
If it is not working please run it with trace enabled:
export SUB_DEBUG=10
and send us a trace.
Re: GPIO operations fail with "Bulk write failed"
./sub_app --gpio=c,0,0
BULK_OUT 11 bytes:
0a 60 08 00 00 00 00 00 00 00 00
BULK_IN 7 bytes:
06 60 04 cf 00 00 00
Transfer incomplete
Failed(rc=7): Bulk write failed
BULK_OUT 11 bytes:
0a 60 08 00 00 00 00 00 00 00 00
BULK_IN 7 bytes:
06 60 04 cf 00 00 00
Transfer incomplete
Failed(rc=7): Bulk write failed
Re: GPIO operations fail with "Bulk write failed"
Sometimes it works and then I get this:
./sub_app --gpio=c,0,0
BULK_OUT 11 bytes:
0a 60 08 00 00 00 00 00 00 00 00
Transfer completed, transferred=11
BULK_IN 7 bytes:
06 60 04 cf 00 00 00
GPIO Config: val=00000000,mask=00000000
GPIO Config: 000000CF
./sub_app --gpio=c,0,0
BULK_OUT 11 bytes:
0a 60 08 00 00 00 00 00 00 00 00
Transfer completed, transferred=11
BULK_IN 7 bytes:
06 60 04 cf 00 00 00
GPIO Config: val=00000000,mask=00000000
GPIO Config: 000000CF
Re: GPIO operations fail with "Bulk write failed"
HI,
There is a line
in libsub.c.
Please try to comment it and rebuild library and application and run this way. Let me know the result.
There is a line
Code: Select all
#define ASYNC_OUT
Please try to comment it and rebuild library and application and run this way. Let me know the result.
Re: GPIO operations fail with "Bulk write failed"
Now it seems to work!
Thank you for the instructions.
Thank you for the instructions.
Re: GPIO operations fail with "Bulk write failed"
Thank you too for the patience and cooperation.
BTW what is your project?
BTW what is your project?
Re: GPIO operations fail with "Bulk write failed"
It's a mobile robotics project.
We have this large (80kg) tracked robot, which needs sensors. We'll use the SUB-20 i2c-bus at least for ultrasonic sensors and local I/O-expanders. AD-converters are used for monitoring voltages and currents of the power system and GPIO for various simple control or sensing tasks. We'll also test if the FPWM can be used for controlling standard hobby servos.
We have this large (80kg) tracked robot, which needs sensors. We'll use the SUB-20 i2c-bus at least for ultrasonic sensors and local I/O-expanders. AD-converters are used for monitoring voltages and currents of the power system and GPIO for various simple control or sensing tasks. We'll also test if the FPWM can be used for controlling standard hobby servos.