13

I recently downloaded the stm32 app for MCU search and found out that for example STM32F429 has "NO" in "USB Device" peripheral, while it says "YES" in "USB OTG FS" and "USB OTG HS". Which is quite surprising since STM32F429 is fully functional as USB Device, i.e. it supports all the libraries and USB classes.
Some other MCUs have "USB Device" stated in it, eg. STM32L052 enter image description here

Then I tried to check CubeMX and found out that there is USB_Device peripheral in their search(and again STM32F429 does not include it, USB stuff is done through OTG).

It may be quite easy question since I suspect that USB Device simply means the one that does not support OTG, but I am not sure, usually MCUs use OTG anyway(and moreover there is only one library, so why state "NO" in USB peripheral). I couldn't find information about it in google or in CubeMX documentation.

I am not really concerned much about it since USB OTG HS seems to work OK with the library, but I'm wondering about terminology.

I understand that probably ST forum is a better place for this question, but many topics there are just don't get answered or answered after 2 years have past. :)

Thanks.

ScienceSamovar
  • 1,206
  • 3
  • 20
  • 39
  • 1
    I've had that experience with the ST forums, so I sympathise... – dim May 16 '16 at 12:59
  • Regarding that ST forum has bad contribution, it is apparently not only the forum, but also per Email, I opened a ticket about a possible mistake in one of their documentation and USB examples, but nobody (yet) bothered himself to write me back. Which is really annoying. – Mohammed Noureldin Jun 04 '19 at 12:16

1 Answers1

23

Your thought are correct: the devices that are marked "Yes" in the USB device column are just able to act as a USB device. They don't support the OTG spec, and they are not able to act as a host either.

But of course, any device capable of USB OTG can, on the other hand, act as a simple device. He who can do more can do less.

They identify them in this way because the "USB device", "OTG FS", and "OTG HS" are three different IP cores in the chips. They all have their particular capabilities/specs, and they may require different drivers (as you noticed).

To sum up:

  • USB device: only able to act as a device, at full speed (12Mbps)
  • USB OTG FS: able to act as a device/host/OTG peripheral, at full speed (12Mbps)
  • USB OTG HS: able to act as a device/host/OTG peripheral, at full speed (12Mbps) or high speed (480Mbps). Note that the HS core for [the vast majority of]* ST MCUs require an external ULPI PHY chip to actually support high speed. The on-chip PHY can only do full speed. ...Yes, it's very confusing.

*Edit: It seems ST finally made some efforts to integrate a on-chip high-speed PHY on a few of their newest MCUs (more specifically: some of the STM32F7x3 and STM32F730 versions, at the moment). However, there isn't a specific column that clearly indicates this feature in their device selection table, which again adds to the confusion. You need to look at the datasheet details.

dim
  • 15,845
  • 3
  • 39
  • 84
  • Ok, thanks, just wanted to hear it not from my own head :) – ScienceSamovar May 16 '16 at 13:02
  • 1
    Relatedly I have an iMX system which has *both* "usb host" and "otg fs", giving it two usable USB ports - but they require different drivers! Something similar may apply to ST - same functionality requiring different software. – pjc50 May 16 '16 at 13:07
  • Indeed, I'm sure they have, or had in the past, devices which had multiple peripheral ports with differing feature level. This is an unambiguous way of listing the features for a range of parts (or it would have seemed so in the past) – Sean Houlihane May 16 '16 at 20:43
  • Hey! Could you expand a bit? If a microcontroller supports USB OTG, could you theoretically have two USB ports connected to the chip: 1 to act as a USB OTG Host (e.g. plug in a keyboard) and the other USB to act as a device? Is there a term to describe this behavior? – NessDan Jan 11 '20 at 23:50
  • 1
    @Ness If the chip only embeds the USB OTG block, no, you can't. But a lot of high-end MCU include both the USB device and the USB OTG blocks. Then you can use both simultaneously and have two independant ports on your MCU: one acting as device and the other as host, yes. Check the datasheets. – dim Jan 12 '20 at 06:36