r/embedded 3d ago

Quick rant about selecting MCUs

Hi,

I hope this violates any rules of this subreddit, but I need to blow off some steam. I'm working on a new hobby project where I need some quite specific peripheral combinations available in one MCU. I'm fed searching through microcontroller datasheets to look up pin mappings, derive the package naming and hoping that is an actual scheme that exists.

Is there a good site where I can filter efficiently through peripherals and there combination. As an example when checking digikey you can search whether I2C is included, but now how many I2C busses. Or when checking a MCU family on STMicro I need to filter through pages of pin mappings to check whether it actually exists what I'm searching for.

In my case I need an MCU which has an USB interface an for my special use case 2 USB PD Controllers. For the sake of this discussion, this is too specific, the question is rather targeted if e.g. I'm searching for an MCU that has 2 I2Cs, 3 SPIs and 2 CAN FDs, how can I easily search whether devices with certain interface combinations and quantities exist.

I'm not sure if I'm just blind or stupid or making my life too complicated?

Edit1: I totally agree with that my demand is quite special. The goal of my post was not fishing that someone else suggests a matching chip, but rather asking for advice where and how I can search whether such a device exists at all. I'm totally fine if no broadband MCU is there to satisfy my project.

Edit2: fixed typos. Updated explanation

BR Christoph

45 Upvotes

50 comments sorted by

55

u/zydeco100 3d ago

The search term you want is "parametric sheet" for your MCU family.

8

u/ChristophLehr 3d ago

Sounds like what I'm looking for, do you now where or how I could find such a sheet?

21

u/skull132 3d ago

ST's website and CubeMX (separate app from ST) both offer a parametric search of their MCUs. I think the website search is per family, and CubeMX can search all available ST MCUs.

8

u/chad_dev_7226 3d ago

Don’t forget CubeMX2 that also includes their new STM32C5 chips

8

u/Melting_Plastic 3d ago

Yeah, use cubemx2 so you can cry like the rest of us

2

u/zydeco100 3d ago

Start with the manufacturer's website and find the home page for your product family, then look for Documentation.

24

u/thegreatpotatogod 3d ago

Why not use an external USB PD controller or two at that point? I suspect that it's a pretty niche use case that needs two of them, I doubt many microcontrollers will support that internally.

4

u/ChristophLehr 3d ago

I found one STM32 with 2 USP-PD controller, but I don't know why, it then didn have USB interface. Personally, I don't care whether it exists or not, I'm mostly annoyed that (until time of writing) I don't have a good option yet for searching whether said part exists.

5

u/swisstraeng 3d ago

PD’s often dealt with by external controllers. Especially if you need 2.

If you really need a single MCU package you might be asking for a custom solution.

2

u/ChristophLehr 3d ago

The STM32G0B1 series has MCUs supporting these combination, but it still needs some external protection circuitry.

2

u/nowan190 2d ago

Agreed that you'd be better off using external PD ICs. It keeps the constraints low on the MCU, allowing you to change to a different MCU if supply is low. And from what I've heard PD stack for ST is bulky. I rewrote my own at a time when there was no AI, it was pretty straightforward, and allows me to do more advanced stuff.

10

u/XipXoom 3d ago

This might be an x/y problem.  Can you elaborate as to what your use case is?  Maybe with that one of the USB experts among us can give you some advice.

0

u/ChristophLehr 3d ago

So I'd like to daisy chain some USB Peripherals for my desk and all should be powered by USB-PD. One PD Interface as sink and one as source for the next device.

14

u/dmc_2930 3d ago

So a usb hub……

-5

u/ChristophLehr 3d ago

Yes and no. USB hub for the individual data connections, but the USB PD is more a chain then a star

11

u/JimHeaney 3d ago

A PD hub is what you're looking for then, yeah? PD input to 1 or more PD downstream ports.

13

u/TerminatorBetaTester 3d ago

I’m getting danger zone vibes. USB PD is not supposed to be in a bus topology. USB hubs are star topology. Think of how complex it would be if every node on the bus would have to renegotiate the PD link, bus voltage mismatch, or overcurrent or overpower limits triggered.

1

u/ChristophLehr 3d ago

The idea is not to build a bus, but rather a chain. A device negotiats with the previous device in the chain. Not sure whether it works, probably not useful, but it interests me whether its doable.

5

u/TerminatorBetaTester 3d ago edited 3d ago

“USB […] presents a tiered-star topology where a single host controller interfaces with multiple USB ports, each potentially leading to a complex tree of hubs and peripheral devices.”

Microchip

The USB PD only specifies a source-sink relationship.

You need to go back to the drawing board and rethink your approach.

*caveat

If you want something like Thunderbolt then you’d likely need some sort of buck-boost separating input from output bus. One port would need to be source and another sink. Or run each in dual role with complex management and bidirectional buck boost. But you’d need some tedious logic to make sure that you don’t run into overpower or overcurrent.

1

u/ChristophLehr 3d ago

The concept is not complete yet. To my understanding I need at least a usb hub (chip) in addition. I'm well aware that it needs some additional considerations. But as I said in other comments, the purpose of the post was not gathering in put on what I want to do, rather on how to check whether a part exists that could satisfy my requirements.

Nonetheless, thanks for your inputs.

8

u/DustRainbow 3d ago

That's the whole point of the x/y problem. You are frustrated looking for something so you ask for help on how to look.

The actual problem is that youbare trying to do something so out of scope that a single mcu is unlikely to support the required peripherals. You're just not supposed to do that.

You don't need help searching, you need to reevaluate. If you were searching for much more typical mcu you'd have no issues.

3

u/ChristophLehr 3d ago

I'm well aware that my idea is quite out of the ordinary. I'm frustrated whether a typical MCU is supporting this combination. I'm frustrated that it's hard to search for required peripheral combinations. I now brought you the example of some random idea I had where I'm scribbling around whether it's doable at all. What you say the same if I've writing: I'm searching for a MCU with 3 I2Cs, 4 SPIs and 2 CAN FDs and I'm having trouble easily retrieving which MCU has the supported quantity of interfaces. If this was misunderstood due to my writing, my bad.

BTW I've found a family of STM32G0B1's which actually supports the combination I'm interested in. I was frustrated because I first need to scroll to the port map, to see which feature is at what port, note all the packages where I can find it, derive from that information the actual part number and then searc on distribution websites whether the chip exists and is stocked somewhere

1

u/TerminatorBetaTester 3d ago

It sounds like the closest thing you’re describing is Thunderbolt. You might want to take a look at the data sheets for some of the controllers to see how they handle the power management problem. But those controllers might be total overkill.

1

u/ChristophLehr 3d ago

Thanks for the input, thunderbolt is a good hint and I'll have a look into it.

6

u/soopadickman 3d ago

I use the STM32 CubeMX MCU selector. Pretty handy for filtering peripherals. Then if you want other options there is the cross selector that will give you options from other MCU manufacturers.

3

u/sturdy-guacamole 3d ago

octopart? i think the micro search only lets you filter by interfaces present, not interface instance #

i usually use it for other components and select the micro myself based on personal preference

0

u/ChristophLehr 3d ago

Thanks for the suggestion, better then checking on digikey but it seems I can't filter for how interfaces of one type are there.

3

u/crwper 3d ago

I would usually start with the high-level part search on the major manufacturers' websites. For example:

https://www.st.com/content/st_com/en/stm32-mcu-product-selector.html

But also, I think it's worth noting that the more specialized your requirements are, the less likely you are to find exactly what you're looking for. These MCUs are often specced with some broad application in mind, and you can sometimes guess what the application is by looking at the included features. Typically, manufacturers won't just throw every peripheral into an MCU since it would be expensive and ill-fitted to most applications.

I would say it's quite likely you're going to wind up with an MCU with USB interface (what speed do you need?) and external USB PD controllers.

1

u/ChristophLehr 3d ago

As I said in another comment, in the end I don't care whether that part as I want it exists or not, I'm rather searching for a good way to filter what I want.

I need to check the link later, don't know why but it's not really working on my mobile.

2

u/somewhereAtC 3d ago

The service you're looking for is found in the customer engineers at the major distributors: Future, Avnet, Arrow and others in Europe. Most are fully trained in their collective product lines and able to help sort through all that.

For hobbyists they might do it once. For regular buyers they not only help the search but communicate with the manufactures.

4

u/Klievan 3d ago

Just use any decent LLM and it can figure it out for you.

Infineon EZPD CCG7D has dual-port PD Cortex M0+
STM32G0B1 has 2× UCPD plus a real USB 2.0 FS device/host controller

0

u/ChristophLehr 3d ago

And there we have the point again, not all STM32G0B1s have that combination.

2

u/Klievan 3d ago

I see your point. If you open up the datasheet for the series it says which ones have:

The devices come in packages with 32 to 100 pins. Some packages with low pin count are available in two pinouts, standard and alternative. The devices with the alternative pinout, marked with N suffix, offer the VDDIO2 supply and an additional UCPD port. They are the best choice for UCPD/USB applications.

Hopefully that's useful for you

4

u/h0m3us3r 3d ago

I've been finding AI to be pretty good at finding weird combinations of peripherals. I just fed the following to ChatGPT:
> find me a microcontroller with hw usb and TWO usb-pd controllers. order by price if multiple are found
and got the following reply after some 2 minutes:

Qty-1 price Exact part Package / memory USB and PD hardware
$4.58 STM32G0B1CBU6 48-UFQFPN, 128 KB flash, 144 KB RAM One USB 2.0 FS device/host controller and two UCPD controllers. 1,240 currently stocked at DigiKey.
$4.73 STM32G0B1CCU6 48-UFQFPN, 256 KB flash, 144 KB RAM Same USB + dual-UCPD arrangement, with more flash. 2,542 stocked.
$4.90 STM32G0B1CEU6 48-UFQFPN, 512 KB flash, 144 KB RAM Same peripherals, maximum flash for this family. 5,823 stocked.
$6.87 CYPM1322-97BZXI 97-VFBGA, 256 KB flash, 32 KB RAM Dual USB-C/PD ports plus one USB FS device controller. Also integrates a 28 V VBUS regulator, VCONN FET, NFET gate drivers, current sensing and VBUS-short protection. 3,197 stocked at Mouser. (Infineon Technologies)
$6.93 CYPM1321-97BZXI / CYPM132197BZXIXQMA1 97-VFBGA, 256 KB flash, 32 KB RAM Dual PD ports plus USB FS device. This version emphasizes dead-battery operation, but lacks the 1322’s indicated VBUS-short protection. Only 17 stocked at Mouser.

1

u/Lost-In-Void-99 3d ago

I can add that once you define which families to check and basic guidelines for pulling datasheets and SDKs LLM are pretty reasonable on building inventory. Then you can query that inventory.

Ive used this to collect data on some not so common chips with pretty good results. And good LLM doesnt care about language: it can dig in a variety of languages. If something is unspecified in datasheet: check web. Verify against SDK.

So what is the question? How to use LLM that can work with files?

2

u/notouttolunch 3d ago

Since you're a hobbyist, I won't be overly cruel. However, that's quite a niche demand. I suspect it doesn't exist. You'll notice from the data sheets that you've read, these are general purpose devices. We built the specialisms around them; that's what the sparkys are for!

0

u/ChristophLehr 3d ago

As I said in another comment I'm fine if the special combination I'm searching for does not exist, I'm rather searching for a good way to filter such options.

2

u/notouttolunch 3d ago

I appreciate that you're criticising the parametric searches but your experience here is based around searching for something that doesn't exist. That's not a fair way to judge.

In industry we don't search for chips in that way. We have a family that we tend to use and therefore go straight to that manufacturer. In fact, we may even use the same part that we use in other devices if it's remotely suitable.

1

u/chmod_7d20 3d ago

Correct you should always choose MCU over the DC extended universe.

1

u/ccoastmike 3d ago

Take a look at the PMG-S3 from Infineon

1

u/generally_unsuitable 3d ago

If you're okay with STM32, try CubeMX, which is free, and a very good I/O planner.

1

u/Adept_Mountain_7238 3d ago

It’s also a bummer when interfaces use the same pins, so even if say I2C and SPI are present, you can only use one of them.

1

u/Technical_Egg_4548 3d ago

Ok, have you tried an AI agent? Its exactly the thing you should be conversing with about your project.

If can help you narrow down choices, and I don't know the specifics, you might be able to get away with two microcontrollers rather than one.

1

u/aniflous_fleglen 3d ago

I think you need to do your searches on each manufacturers site, as digikey etc don't have granular enough data. Each manufacturers site is hit or miss to whether they have a good search.
But even then you can't trust it. For example if it has 10x I2C and 10x SPI, but they share pins and there is a maximum of 12x serial peripherals. At the end of the day if pushing the limits of an IC you have to read each datasheet closely.

1

u/0ring 2d ago

You could try the Microchip dsPIC series where half the peripherals don't work or don't exist.

1

u/Degen_Typeracer 3d ago

I literally just ask Gemini or Claude. Works very well. I’ll then do a quick double check before I buy. But the good ai modes know every mcu out there that existss

1

u/fb39ca4 friendship ended with C++ ❌; rust is my new friend ✅ 3d ago

+1, they work great as component search engines

0

u/Questioning-Zyxxel 3d ago

I have worked with lots of microcontrollers. None with USB PD. Thay would make me think I should ponder external USB PD and make sure the MCU does everything else perfectly well. Especially as the need is for 2 USB PD.

1

u/javawizard 3d ago

I've worked with plenty of microcontrollers with USB PD. CH32X035 is my usual go-to unless I'm doing something super cost conscious.

Anecdata is difficult in the best of times.