And of course the counterfeit problem has very little to do with what node is used to produce the chips; it's a question of how effective your society's institutions are at keeping fraud under control.
This page estimates 90nm for the CH32V003, and I found another post very roughly estimating 130nm. And a pi pico isn't all that fancy either at 40nm.
And should I be very worried about counterfeit microcontrollers? It seems like a lot of effort, and like it would probably still work.
There's the clearly labeled and advertised GD32F103 style clone which is pin-compatible, supports higher clock speeds than the original STM32F103, but takes much longer to power on and has different analog characteristics, maybe some worse; not a problem.
There's the potential case where somebody sells you a GD32 telling you it's an STM32, either with the proper markings, with the markings sanded off, or with actually fake markings. This still might cause no problems, or might result in a problem that takes you a long time to track down. (Maybe you're unknowingly relying on, say, the hypothetical lower power consumption of a clone, so when you fab a batch with real STM32s, the product's battery life goes to shit.) You can detect this in firmware and may be able to come up with workarounds. Or, if your vendor is FTDI, they may sneak malware into their Microsoft Windows driver and brick your products months or years after you've sold them. They've done it twice.
There's the case where the clone is designed to act as much like the original as possible, so maybe you can't detect the substitution in firmware and can't work around whatever problems the counterfeit is causing.
Then there's the case where you ordered 10,000 STM32s in a QFN-32 and got 10,000 QFN-32s that say "STM32" on them but are actually PICs with a totally different pinout, or SRAM, or something else. These will not probably still work.
https://magazine.raspberrypi.com/articles/what-is-programmab...
The microcontroller has additional cores called state machines in the PIOs that are specifically designed for bit banging and have their own custom ISA that reportedly only has 9 instructions.
The Padauk FPPA chips are probably a bit better at bitbanging strange protocols than any ARM, but not in the same class as the Pi's PIO.
• decrement the X or Y register;
• conditionally jump to a specified target address if it was nonzero;
• otherwise, jump (by "wrapping") to some other specified target address, usually an outer infinite loop;
• change the state of four or less GPIO pins to immediate constants;
• delay 1–15 clock cycles.
Arguably IN can compete here, replacing the first two items with:
• set one or more GPIO pins from bits shifted out of a shift register;
• conditionally "autopull" a 32-bit word from an input FIFO if the shift register is empty;
• conditionally stall the pioasm program if the FIFO is empty;
• conditionally initiate a DMA request to refill the FIFO if it's not full.
The OUT instruction has similar "autopush" capabilities.
Most of these are somewhat independent choices, but if you don't pull from the FIFO you won't have the other effects, and several of the options are state-machine-wide.