USB Host, what solution?

Post here first, or if you can't find a relevant section!
BennehBoy
Posts: 123
Joined: Sat Jan 04, 2020 2:38 am
Answers: 1

Re: USB Host, what solution?

Post 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.
User avatar
fpiSTM
Posts: 996
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 46
Location: Le Mans
Contact:

Re: USB Host, what solution?

Post by fpiSTM »

Note that STM32 core provide dwt api to help usage. ;)
And that delayMicroseconds use it when it is available.
BennehBoy
Posts: 123
Joined: Sat Jan 04, 2020 2:38 am
Answers: 1

Re: USB Host, what solution?

Post 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?
User avatar
fpiSTM
Posts: 996
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 46
Location: Le Mans
Contact:

Re: USB Host, what solution?

Post by fpiSTM »

BennehBoy
Posts: 123
Joined: Sat Jan 04, 2020 2:38 am
Answers: 1

Re: USB Host, what solution?

Post 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.
Post Reply

Return to “General discussion”