Is it possible to toggle or bit bash the D+ data line on a RISC OS USB port?
Neil Fazakerley (464) 124 posts |
Maybe via some sneaky, low-level means? |
Dave Higton (1515) 3525 posts |
The important question is why you want to do that. Does the line have another, non-USB, use in your case? |
Rick Murray (539) 13840 posts |
If his Pi works well at 5V, it’ll run so much faster at 12V. |
Neil Fazakerley (464) 124 posts |
Yes, I need it for a non-USB use. |
Dave Higton (1515) 3525 posts |
You’re into GPIO, then. I can’t offer you any specific help on an ArmBook, sorry. In general terms, you’d have to set the line as GPIO, if that’s even possible – USB tends to be dedicated as such. Have you checked whether other lines are available to be configured and used as GPIO? |
Rick Murray (539) 13840 posts |
Use GPIO. Do not use USB at all. Generally, fast charge signalling aside, USB is a complex protocol so it is unlikely that any sort of direct control will be provided for the data lines. Moreso if the USB port on question is through an internal hub rather than directly from the SoC (as in the case on the Pi, for example). All of this is controlled by firmware inside the hardware. Furthermore, the D+ and D- are a differential signal pair. They are not intended to carry a load, and attempting to do so may leave you with either a non-functional USB port or a non-functional chip. USB supports over current protection, but this is probably only for the power pins as, did I mention that the data pins are a differential signal pair? Really, don’t (ab)use USB. This sort of thing is what GPIO is for. And if the machine in question doesn’t have any GPIO available, you could consider a USB I/O expander? |
Stuart Swales (8827) 1357 posts |
It’s also far less expensive when you blow up your £10 GPIO-over-USB adaptor. Or even use the cheapest headless Pi you can get over a network to drive GPIO. |
Tank (53) 375 posts |