|
Forum Index : Microcontroller and PC projects : CMM2G2v2 FW ver 7 bottom USB port question....
| Author | Message | ||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 10128 |
Hi all. Can someone - probably Peter - tell me if the BOTTOM USB socket on the G2 boards with the v7 FW, is supposed to work or not? No matter what I try, NOTHING is EVER recognized on the BOTTOM USB socket, and I have now tried about SIX different boards, and NONE of them will recognize ANYTHING on the BOTTOM USB socket. The top one sees everything fine, and if I plug in a USB hub to the TOP socket, I can have a keyboard, mouse and USB flash drive all plugged in and the CMM2 sees them all fine. But NOTHING AT ALL on the bottom socket on ANY of the boards I have here. I seems unlikely that six different boards could all have faulty bottom USB sockets, so can I get some clarification here? Perhaps the new v7 FW only supports the TOP USB socket? Perhaps that was mentioned somewhere else, but I missed it? Smoke makes things work. When the smoke gets out, it stops! |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12242 |
RTFM? The bottom socket is for a PS2 mouse |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 10128 |
Oh, OK. I thought the new FW did away with needing a PS/2 mouse, and they were both on the new USB stack, cos the new FW supports USB mice, so why would you NEED a PS/2 mouse - on a USB port anymore, when USB mice are now natively supported.... My assumption, but that's good to know - I will make sure it is mentioned in my little blurb thing I include with every unit. If I wondered what was going on, I can guarantee others would too. Smoke makes things work. When the smoke gets out, it stops! |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12242 |
The G2 board does not have a usb hub so there is no way the firmware can connect anything usb on that connector. It was specifically designed to allow a PS2 compatible mouse to plug straight in and work and this is clearly documented. I thought seriously about including an on-board hub on the G3 like the Pico Computer 3 but decided against it. The STM32H743 has a silicon limitation that only full-speed usb devices are supported through a hub. This would mean that the vast majority of old keyboards and mice which are low-speed wouldn't work. I therefore decided to leave the wiring as-is in the G3 and let the user connect via an external unpowered hub to the USB if they so desired. They will then have the restriction on full speed only devices and will need to select accordingly. Plugging a low speed keyboard direct on the G3 will still work and coupled with a PS2 mouse and Wii Classic you have a complete gaming setup. |
||||
| homa Guru Joined: 05/11/2021 Location: GermanyPosts: 771 |
Peter, Am I right in understanding that the STM32H743 only has one USB port? If it had two, you could connect the USB hub to one of them, just like on the PC3 board. And connect the other one directly, so that a low-speed keyboard is supported. PS/2 support could then be sorted out via a pin header… I think it’s getting harder and harder to get hold of these old keyboards and mice. And USB is simply more up to date. But as I said, I don’t know enough about the hardware options of the STM32H743. So please take this just as a suggestion or a query. Matthias |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9373 |
The chip actually contains 2 USB 2.0 OTG interfaces, one Full speed and one High/Full speed according to the data sheet. However that doesn't mean that they are both usable in the CMM2 design. Mick Zilog Inside! nascom.info for Nascom & Gemini |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12242 |
The high speed port needs an external ULPI PHY such as a USB3300, USB3320 which needs 8 × data pins 1 × clock pin 3 × control pins i.e. not doable |
||||
| homa Guru Joined: 05/11/2021 Location: GermanyPosts: 771 |
Thanks for the explanation. |
||||
| robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2562 |
one (simple) option may be to use a pico (RP2040 or RP2350) acting as a USB host and connected to your low-speed USB mouse, that in turn outputs the PS/2 signals expected by the CMM2: https://github.com/No0ne/ps2pico silicon chip ran an article about this using No0ne's code a few years back. another, albeit far more convoluted option (and i don't know if anyone has ever tried this) is to program an RP2040 to: 1. present as a high-speed (12Mbps) hub in upstream direction using the onboard USB hardware, that plugs into the CMM2's USB port, while, 2. providing 4 downstream low-speed (1.5Mbps) USB host ports (implemented using PIO blocks), with data for each of the four ports translated in software to a 12Mbps format stream. actually, scrub the more convoluted option above - re-reading Peter's posting i see that full-speed would be needed upstream, which the RP2040 and RP2350 are incapable of! but the No0ne solution still remains. cheers, rob :-) Edited 2026-11-16 00:22 by robert.rozee |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12242 |
Microsoft basic optical mouse v2.0 is still widely available and cheap and guaranteed to work, just make sure you get precisely that spec. |
||||
| robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2562 |
there may be another route - hopefully Peter can comment on this... according to Gemini: "You can operate both onboard USB ports simultaneously at Low-Speed (1.5 Mbps) and Full-Speed (12 Mbps) using only the STM32H743's built-in internal PHYs, with no external PHY chips required". and in response to the question, 'and BOTH ports can act as HOST ports?' she responds: "Yes, both USB_OTG_HS1 and USB_OTG_HS2 are full On-The-Go (OTG) controllers, meaning both ports can act as USB Host ports simultaneously (or independently as Host, Device, or dual-role OTG)". so it MAY be possible to have two USB host ports operating out of the STM32H743, one of which can be servicing a Low-Speed USB keyboard and the other simultaneously servicing a Low-Speed USB mouse. note: you still can NOT use a USB hub! from the hardware perspective this would require connecting an additional USB socket to the currently unused (?) second port's D+ and D- pins on the STM32H743 chip (no external PHY required). this may require some fine soldering. and from the firmware perspective, it would be necessary to duplicate the a second USB firmware stack. personally, i suspect that just using No0ne's RP2040 USB to PS/2 solution is likely to be far easier for everyone! addendum: there is a catch. the pins PB14 & PB15 (the other USB port's D+ and D- pins) are currently used for VGA video output. making use of the second USB port would therefore require re-jigging the mmbasic firmware to use alternative pins for the VGA, and re-routing the DAC pins accordingly. this could quickly get complicated! cheers, rob :-) Edited 2026-11-16 20:12 by robert.rozee |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12242 |
Correct, I did look at it but dismissed it for this reason, plus it would be a major rework of the 4-layer PCB which is done by hand and takes many hours |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9373 |
Post deleted 'cos I took to long over it. :) . Edited 2026-11-16 20:31 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini |
||||
| robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2562 |
good point - and the gains are pretty marginal given that (a) PS/2 mouses are still available, as well as (b) the option to use a RP2040 to convert from USB to PS/2 exists. Gemini just informed me that she was mistaken, and that PB14 & PB15 are in fact routed to pins 35 and 38 (SPI2 MISO and SPI2 MOSI) on the CMM2's 40-pin rear connector. is this correct, or is she hallucinating again?! addendum: hmmm, just looked at the CMM2 G1 schematic from Geoff's website, and i see that indeed PB14 & PB15 are routed to the 40-pin rear connector. this raises an interesting possibility! cheers, rob :-) Edited 2026-11-16 20:44 by robert.rozee |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9373 |
What??? Gemini made a mistake? You need to get a proper AI (as someone who shall remain nameless said to me). ;) Mick Zilog Inside! nascom.info for Nascom & Gemini |
||||
| robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2562 |
the problem with them (AI's) is that when approached in a civil and conversational way they are... simply very human. that is: they make mistakes, without malice provide incorrect information, guess, and omit important details that later prove to be very important. but the conversation is always pleasant, and they are clearly wanting to help! i believe Peter's approach is to act as a project manager, overseeing teams of programmer AIs, tester AIs, specification writer AIs, etc. his part is to coordinate the various teams (and where necessary individuals) in such a way that Continual Improvement is necessarily achieved through Iterative and Incremental Development. no mean feat, and certainly not something i could ever do. cheers, rob :-) |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12242 |
See https://mather.host/blog/cmm2-usb-full-speed/ for how to select cheap mice and keyboards that will work through a hub. For example, I use the Tecknet TK-GM006 mouse and it works perfectly (£9.99 on Amazon UK). The Trust Gaming GXT 834 Callaz TKL Mechanical Gaming Keyboard (£18 on Amazon) is almost certainly full spoeed but I haven't tested this myself |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |