ACCount36
7 months ago
The thing I loathe the most about embedded work is dealing with silicon vendors and their boneheaded refusal to publish the fucking documentation and tooling.
junon
7 months ago
Microchip in particular is very bad at developer experience and tooling. The only vendor I actually enjoy working with to any degree is ST, and only design boards using their uC's for that reason.
I've heard good things about Nordic, though. Might try them out at some point.
Microchip's own IDE and project generator spit out a hello world project that didn't even compile. NXP wouldn't even let me download their tooling even after their obfuscated sign up flow.
HeyLaughingBoy
7 months ago
Good god. I literally just uninstalled MPLAB IDE for a project that we cancelled. It freed up something like 30Gb on my system. I built the existing project once!
I also really like ST. At a previous job our go-to processors were Nordic for wearables or anything that needed BLE, and STM32 for pretty much everything else. Wasn't unusual to have an STM32 for all the peripheral I/O and an nRF52 hanging off an I2C port just to talk to an app.
Nordic is OK. Starting up a new project is nowhere near as easy as STMCubeMX and they do tend to update their SDKs frequently which can be annoying if you have to support legacy projects, but we used them for years with no problems.
junon
7 months ago
That's good to know, thanks! And yeah, STMCube's quick pin config and clock config tools alone are what keep me coming back. I don't use any of the C generation or code editing/compiling stuff (I write all of my firmware in Rust) but having the configurator there to quickly configure peripherals is space age levels of tooling compared to any other manu I've worked with so far.
Gracana
7 months ago
I was on the Microchip bandwagon until the PIC32. Little MIPS MCUs with onboard RAM and graphics, awesome! ...except they came with an errata that listed huge problems with every interesting peripheral, and it didn't improve for ages. They may still suck, I don't know.
A while back I tried out Espressif's esp32 and I was impressed by what they were offering. Their devices seem to be well documented and the esp-idf framework is really pleasant to use. It's much easier to work with than STM32Cube and ST's sprawling documentation.
Sanzig
7 months ago
I really like the STM32 ecosystem, but you have hit the nail on the head - there's too many variants. You really don't need 200 variations of a basic M0+ part, and having all those SKUs hurts availability because you're playing roulette when it comes to what will actually be in stock when your CM goes to order parts.
azonenberg
7 months ago
I did not like that part of it.
Personally I've standardized on just three STM32 parts:
* L031 for throwaway-cheap stuff where I'm never going to do field firmware updates (so no need to burn flash on a proper bootloader) and just need to toggle some GPIOs or something
* L431 for most "small" stuff; I use these heavily on my large/complex designs as PMICs to control power rail and reset sequencing. They come in packages ranging from QFN-32 to 100-ball 0.5mm BGA which gives a nice range of IO densities.
* H735 for the main processor in a complex design (the kinds of thing most people would throw embedded Linux at). I frequently pair these with an FPGA to do the heavy datapath lifting while the H735 runs the control plane of the system.
HeyLaughingBoy
7 months ago
+1
This is the approach I took at my last job: we standardized on a small handful of CPUs selected for a certain level of complexity. Before this, choosing a CPU was an agonizing task that took days and didn't add a lot of value. The only time it actually mattered was the one time we got an order of several 100,000 units. In that case, you want to get the BOM cost as low as you can.
Trying to get the same thing implemented at my current job. I'm seeing the same behavior where a team takes forever to choose a processor, and a "good enough" choice would have taken a couple of hours.
Aurornis
7 months ago
> The only vendor I actually enjoy working with to any degree is ST, and only design boards using their uC's for that reason.
ST has good documentation most of the time, but for a while some of their higher end MCUs had a lot of weird bugs and errata that were simply not documented. I haven’t used any of their modern parts recently but I’ve heard the situation has started improving. I have some friends who were ready to abandon ST altogether after losing so much time on a design to undocumented bugs and parts not behaving as documented.
azonenberg
7 months ago
I don't think I've ever used a ST part without reporting a bunch of datasheet errors.
I haven't been bit by an undocumented silicon bug, but I step on documented STM32H7 bugs on a pretty regular basis and there are some poor design decisions around the OCTOSPI (in addition to bugs) that make me avoid it in almost every situation.
But at least they document (mostly correctly) the registers to talk to their crypto accelerator unlike the Renesas and NXP parts I looked at as potential replacements, both of which needed an NDA to get any info about the registers (although they did supply obfuscated or blob driver layers IIRC).
technothrasher
7 months ago
I got very wary of ST when some of their STM32C chips that were rated for -40C consistently stopped working correctly for me at -20C, and their support response was basically a big shrug.
ACCount36
7 months ago
True, and Microchip is still good when compared to the likes of Broadcom and Qualcomm.
ants_everywhere
7 months ago
I don't do embedded work, but I see Broadcom and Qualcomm show up a lot in Linux bugs.
I'd love to hear stories of what it's like to work with chips from these companies.
sumtechguy
7 months ago
When I worked at qcom it took 2 devs 3 managers and 2 directors to get another group to let us fix a single race condition in their code. Once I got a copy of the code I started handing off tons of memory overwrites and underruns back for them to fix and another 10 or so race conditions. Their initial stance was 'there is nothing wrong with the code it is your code that is broken'. That was internal in the same vertical. It would be awful to work as an external group with that lib. Other stacks I got to look into were in similar shape. Some groups if you got their code you knew it was going to be solid and you would learn a thing or two. Others groups you were kind of surprised it compiled.
ants_everywhere
7 months ago
that's a bit depressing :(
AlotOfReading
7 months ago
Unless you're buying hundreds of thousands of chips, you don't even get the "opportunity" to work with them. They won't sell you chips directly or return emails reliably.
If you're working at one of the big companies (e.g. Microsoft), they'll give you access to the documentation and source code that should be open for everyone, but even then you're going to spend time reverse engineering your own documentation because trying to get details from them is a months long process of no one being willing to say yes. It's painful. Best to stay away unless you have no other alternatives.
ajb
7 months ago
As a small company with relatively low volumes (10,000s) , the only way to work with them is via an OEM who has an existing relationship with a distributor (not with the actual semiconductor company). That means you won't own your PCB design, at least for most OEMs, because they don't make money on the NRE (non recurring expense) so need you to use them for manufacturing to make back their investment.
For larger volumes, ~100,000 you get to talk to a distributor yourself and design your own pcb. You still won't get to talk to anyone at BigSemiCo, but you will get access to datasheets and (probably) drivers. You will have to sign an NDA.
For their largest customers, they go all out. The customer gets significant input into the design roadmap years in advance. They can get cost-reduced versions of existing parts that leave off blocks they aren't using. reference board designs and example software are provided (to the extent that low-margin, enormous volume customers sometimes just change the html logo and ship). If the product needs integrating, Field Engineers will be flown out to assist.
There are some levels between these last two, where they will talk to you but not invest as much.
Take the above numbers with a pinch of salt; it's been a while since I was in that industry
bgnn
7 months ago
I don't know what's it like to work with their chips, but I worked at one of them designing chips. There is often a block designed by someone 10 years ago but left the company, it has bugs, but nobody dares to touch it and fix it because "we knyiw ots bugs" and nobody really knows what's happening under the hood. So someone writes a wrapper for the next gen, to add new features. This person soon leaves the company.. rinse and repeat. I've seen wrapper of a wrapper of a wrapper on 10th gen of a product in 5nm process of a product line started its life when 90nm was state of the art. Most of the the bugs accumulated over the years were still there. They won't fix it as long as a big customer doesn't complain about it.
ants_everywhere
7 months ago
oh wow. do they at least keep a list of known bugs centrally? or do they just hope nobody notices?
bgnn
7 months ago
They do, but it's hidden from the customer of course.
azonenberg
7 months ago
This is why I used a VSC PHY. After they bought Microsemi (and Vitesse as a division of Microsemi) it looked like the only viable option to get a QSGMII PHY since all the other players were much worse.
When I first started the project in 2012-13, Vitesse was just as NDA-happy and I ruled them out. The original roadmap called for a 24-port switch with 24 individual TI DP83867 SGMII PHYs on three 8-port line cards.
ranma42
7 months ago
BTW looking at the 8051 patch bytes, they look like 8051 code to me. 0x02 is the ljmp opcode, so this is a jump table: 0x02, 0x40, 0x58, 0x02, 0x40, 0x4e, 0x02, 0x44, 0x00, 0x02, 0x42, 0x2b, 0x02, 0x41, 0x82
I poked at a vsc73xx-based switch in the past and wrote my own test firmware, but had problems with packet loss since I didn't do all the necessary phy initializations I guess, in case this might be of interest: https://github.com/ranma/openvsc73xx/blob/master/example/pay...
Also on the device I had the EEPROM was tiny and the code is loaded from EEPROM into RAM, you were pretty much stuck with 8051 assembly that had to fit into the 8KiB of onchip RAM :)
azonenberg
7 months ago
Those addresses all make sense, as 0x4000 - 4fff appears to be where the 8051 has its RAM mapped (all of the peek/poke addresses used for accessing serdes fields are on the high end)
junon
7 months ago
Oh yeah definitely.
GeneralSyb
7 months ago
I'm not really an embedded engineer, just getting my degree in EE and doing hobby projects with embedded. For one particular project I've been using a number for different BLE microcontrollers to see what works best. Started out with the ESP32 where I got everything running pretty quickly but the current consumption was about 10x as high as I wanted it to be. Then made a design with an STM32 and at first I liked the IDE and the documentation, but I sort of ran a ground and also disliked how incredibly expensive this particular microcontroller was. Now on my desk I have one which I think is the cheapest BLE microcontrollers from Silicon labs. EFR22BG22CC something. Neat little thing in a QFN-32 package, a simple hardware design and a lot cheaper than the STM32. The IDE seems pretty simple and I think that most of their tooling is open source since there is also an implementation for it in visual studio code. Documentation isn't as great, but I can get by. And also, despite the wide range of microcontrollers they offer, they do seem to be available in large quantities. The one I used mouser had like 350k of and more on the way.
I've yet to see anyone here talk about silicon labs microcontrollers. Why's that?
stephen_g
7 months ago
Which NXP tooling did you have trouble with? I’ve downloaded MCUXpresso earlier this week, no NDA or anything (yes you do need an account), it’s never been hard to get…
junon
7 months ago
I remember their site inexplicably not letting me download anything despite being logged in. I think it wasn't able to retain my session for some reason, though it's been a while (I looked around 2023).
I do remember trying different browsers and even different machines, to no avail. Quickly gave up.
tliltocatl
7 months ago
Nordics are good with documentation and devex indeed. Zephyr is still a bloated and somewhat buggy disaster for this scale of MCUs. Doesn't really beats ST unless you are power-constrained and need wireless connectivity - the hardware is a bit too quirky.
bardak
7 months ago
One of the biggest advantages I saw from the Raspberry Pi rp series for amateurs is they they have great documentation.
traverseda
7 months ago
Why though? This is clearly a problem I just don't understand what the vendors are getting out of it.
ACCount36
7 months ago
Perhaps they think that by forcing everyone to go through the sales dept just to get the basic docs, they'll get better sales opportunities.
How do you upsell a hardware engineer who just wants to buy a specific chip, and already has everything to evaluate and use it? You don't. So you force everyone to go through sales, and then sales wants to talk to non-engineering higher-ups, and then the upsell happens - while the people who actually knew what they wanted remain as far away as possible.
And if you don't have the pockets deep enough for the sales dept to acknowledge your existence, then you might as well not exist.
stephen_g
7 months ago
They don’t care about ‘upselling’ - it’s just that they only really care about the orders that are at least in the tens of thousands of units (or for the Broadcoms of the world, hundreds of thousands) per year, and ongoing.
If you even promise to buy a few hundred a year through a business, it puts you in a different category and everything gets much easier, but you usually have to go via a distributor (Avnet, Future, Arrow etc.). But if you’re big enough (the hundreds of thousands + qtys) these companies will actually send dedicated support engineers to work with you and help you integrate their parts into your product.
Aurornis
7 months ago
When you get into high volume production, the vendors have their own engineers who will work with you directly. Depending on the arrangement and your volume they might bill you for the time, require you to buy blocks of support hours, or they might bend over backward to help you out in any way possible if you’re buying enough parts from them.
Dealing with small clients is not a priority for most part vendors. Many of them won’t even sell you chips at all until you can qualify yourself as a big customer or, in some cases, buy a license to start designing with their parts for six figures or more.
Unfortunately for the small players, it’s not a priority for most companies to support small customers who might only buy a couple thousand parts or less.
Kirby64
7 months ago
Because creating good documentation suitable for external consumers costs money, and even if you have decent documentation, people buying small quantities of parts can end up costing companies money just to interact with one of their application engineers. If you're not set up for it (very few companies are), it literally is negative value to answer support questions for small time customers.
Dylan16807
7 months ago
I'm not sure how your answer relates to the question about why they won't release documentation they already have. Are you saying that releasing documentation is going to increase the number of support questions?
If you want to sell or limit support, why not do that without the documentation complications?
Kirby64
7 months ago
> Are you saying that releasing documentation is going to increase the number of support questions?
Yes, absolutely. Notoriously, smaller customers are more needy in fact. The bigger the customer, the more competent their engineers tend to be (or, the more time they have to spend figuring out how to use your stuff). Smaller customers try to offload support onto vendors, which pushes burden onto internal vendor teams (who don't want to provide the support...).
Dylan16807
7 months ago
Smaller customers are more needy, sure, but there's a couple steps missing here. Is better public documentation going to bring in a lot more small customers, more than it solves problems? Is an NDA by itself keeping away lots of small customers?
Kirby64
7 months ago
> Is better public documentation going to bring in a lot more small customers, more than it solves problems?
Maybe. The other thing is that public documentation gets a lot more scrutiny than internal documentation. You don't have any resource to talk to, so something like typos or mistakes need to be corrected rather than just papered over by a helpful applications engineer.
bgnn
7 months ago
Because the margin per chip is low and supporting more customers cost more. They sell these parts for couple of bucks/part at volume, although it costs 20-30 million NRE. With the fixed production costs added, they have tens of cents per part margin. At that point less than 1M part customer becomes irrelevant.
gosub100
7 months ago
Guessing: if you publish too much about your design, competitors can use it against you during sales negotiations. "Don't buy theirs, ours has better pin placement, better IF, better thermals, etc"
dgfitz
7 months ago
I think the short answer is because manufacturers don’t care.
rcxdude
7 months ago
There's certainly cases where the documentation basically doesn't exist, or it's essentially the same as the design documentation, and the strategy is basically that if you're a big enough customer then you'll be getting some engineer time to make things work, and if you're a smaller customer you'll be told to pound sand anyway, it's not worth them fixing up their documentation to get your business. Generally the more complex and specialised the hardware the more it'll look like this, and it basically saves them on R&D because they have only a few applications to actually focus on.
FpUser
7 months ago
My last experience with embedded MCUs was few years ago with ATMEL and all was fine
InitialLastName
7 months ago
Atmel hasn't existed for almost 10 years (Microchip bought them in 2016). The situation has not improved in the intervening time.
FpUser
7 months ago
Too bad. Did not know about it.