Page 3 of 3

Re: USB Host, what solution?

Posted: Wed Apr 21, 2021 9:32 am
by BennehBoy
That works a charm, thanks!

Now to get the scope on the GPIO's to make sure it's behaving as expected.

Also need to work around the fact that the delays currently block simultaneous GPIO signal changes.

Re: USB Host, what solution?

Posted: Wed Apr 21, 2021 9:35 am
by fpiSTM
Note that STM32 core provide dwt api to help usage. ;)
And that delayMicroseconds use it when it is available.

Re: USB Host, what solution?

Posted: Wed Apr 21, 2021 2:03 pm
by BennehBoy
Yup, but tbh it's easier to get the usb OTG host only & HID working in cube for now.

So I have everything wired and the mouse works, after a fashion, on the Amiga - still need to get the scope on the signals because the mouse is behaving as if massively accelerated at the moment (big delta movements for corresponding mouse movements - so it's 'unusable').

BUT... the device doesn't recognise the mouse until I replug it.

Anyone know how I can re-enumerate USB? Googling seems to turn up a lot of kludges, is there something elegant?

Re: USB Host, what solution?

Posted: Wed Apr 21, 2021 4:00 pm
by fpiSTM

Re: USB Host, what solution?

Posted: Wed Apr 21, 2021 4:48 pm
by BennehBoy
Fixed the 'acceleration' issue. basically the mouse data wasn't being cleared once processed, so the quadrature signals kept getting looped over. Setting them back to zero between samples fixes this (am disabling interrupts whilst the GPIO's are manipulated).

Will read that thanks Frederic.