Not quite a total noob needs advice on which microcontroller to play with - Page 1
Forum section: electronics / general

author: IconicPCB
author_rank: Super Contributor
timestamp: January 04, 2025, 11:27:36 am
content: Like the heading say.. I have some experience with ATmega range of micro controllers and C compilers. Some very old experience with Motorola 6800 micro processor family going back to seventies.I am looking for a recommendation of a micro controller, 16 bit word akin to (with similar range of peripherals ) ATmega range with a C compiler.Your recommendation will be greatly appreciated.

author: brucehoult
author_rank: Super Contributor
timestamp: January 04, 2025, 12:11:37 pm
content: It is ABSOLUTELY impossible to say without knowing things such as how much RAM and flash you need, how many I/O pins, what smarter peripherals, what MHz etc etc.If the ATMega328 can do what you want then the CH32V003 can usually do the same job much faster and cheaper -- $0.10 for an 8 pin package (like ATTiny85) to $0.15 for a 20 pin package, runs at 48 MHz. Same 2k RAM, flash looks less at 16k, but RISC-V code is often going to be much more compact than AVR.The Raspberry Pi Pico 2 is also an excellent choice for $5, with 520 KB RAM, 4 MB flash, 150 MHz, and your choice (at runtime) of ARMv7 or RISC-V CPUs.QuoteThat pretty much reduces it to PIC24 or MSP430.But there's not much point in 16 bit when there are scads of 32 bit MCUs that are cheaper.

author: IconicPCB
author_rank: Super Contributor
timestamp: January 05, 2025, 10:46:21 am
content: Bruce ,thanks for the pointer at CH32V003.WCH have an interesting range of micro controllers.

author: brucehoult
author_rank: Super Contributor
timestamp: January 05, 2025, 11:10:26 am
content: Quote from: IconicPCB on January 05, 2025, 10:46:21 amYes they do. Good features and price. They've attracted quite a few people from this forum (and others) in the last couple of years. Their (non MCU) usb-uart chip has also taken a lot of market from FTDI.Incidentally I got my asm programming start on 6502 as a 17 yr old self-teaching from the Apple manual in 1980. In 1983 a couple of uni friends and I designed and built a wire-wrapped 6809 and wrote a simple OS and compiler (BCPL back end from ocode) for it.Good starter kithttps://www.aliexpress.us/item/1005004895791296.html50 chip lotshttps://www.aliexpress.us/item/1005005036714708.htmlSome interesting projects people have done with CH32V003

author: NorthGuy
author_rank: Super Contributor
timestamp: January 05, 2025, 03:44:04 pm
content: It's like if you asked for a ball to play with, someone would recommend a basketball, you would take it and go play golf with it. That would be a lot of fun.What are you going to do with your new MCU?

author: IconicPCB
author_rank: Super Contributor
timestamp: January 06, 2025, 01:22:02 am
content: basket ball has textured surface...just like a golf ball. I wonder if I can play golf with lacrosse stick? After all lacrosse ball is also kind of textured.I am looking to see if the performance of a 12 or more bits ADC peripheral can provide reasonable ( noise ) performance.

author: NorthGuy
author_rank: Super Contributor
timestamp: January 06, 2025, 03:23:23 pm
content: Quote from: IconicPCB on January 06, 2025, 01:22:02 amI've never seen a lacrosse ball. But I'm sure this depends on your ability to add big numbers. As well as your communication skills with the group behind you.Quote from: IconicPCB on January 06, 2025, 01:22:02 amThere are MCUs which use the same power for digital and ADC and use VDD as an ADC reference. There are others that provide special pins for ADC power, as well as a reference pin for ADC, or even two reference pins (negative and positive). If you provide stable power/reference to such MCUs, you will minimize noise coming from power and reference. Thus, for better ADC performance I would use one of these.Unfortunately, you probably won't find this information in parametric searches, so you would need to look at datasheets. The datasheet should also list ADC characteristics - accuracy, linearity, offset error etc.

author: peter-h
author_rank: Super Contributor
timestamp: January 06, 2025, 04:39:10 pm
content: One can't begin to answer this without knowing- one off or production- looking short term, or long term for more serious stuffI recommend STM and ARM32. The Cube IDE toolkit has a learning curve but they probably all do.

author: Siwastaja
author_rank: Super Contributor
timestamp: January 06, 2025, 05:38:55 pm
content: In my opinion, noise performance of STM32 microcontrollers is "reasonable"; if that is not enough then probably external ADC is better idea than trying to find a microocontroller with exceptionally good internal ADC performanceI suggest ARM because that enables largest selection of different manufacturers and products while keeping significant part (CPU core, interrupt system, compiler and other tooling, flashing/debugging devices) fixed and reduces time to switch to yet another microcontroller if need arises. STM32 is popular and OK; others are OK too.

author: peter-h
author_rank: Super Contributor
timestamp: January 06, 2025, 08:20:25 pm
content: Every on-CPU ADC I have ever used exhibited the last 2-3 bits as "random", and meaningful only if you e.g. took 100 readings, added them up, and divided by 100That gives you roughly 3 bits back - assuming the noise is random, not synced to anything, etc.Fortunately this works OK because these ADCs tend to be pretty fast.

author: NorthGuy
author_rank: Super Contributor
timestamp: January 07, 2025, 12:17:36 am
content: Quote from: peter-h on January 06, 2025, 08:20:25 pmThere's a characteristic called "Effective Number of Bits" (ENOB) which tells how many bits in the ADC reading is real. Sometimes it'll be listed in the datasheet.Not all of the errors are random. You can average out the random noise, but there will be errors which you cannot average. For example, often ADCs have an offset error - every reading is offset by a fixed value, say 3 units higher then it should be. This error won't look like noise, so people often don't see it at all. Even though such errors cannot be removed by averaging, they may be calibrated away if you have something to calibrate against. So, if you try harder, you can improve ADC accuracy, often considerably.

author: brucehoult
author_rank: Super Contributor
timestamp: January 07, 2025, 02:32:06 am
content: Quote from: NorthGuy on January 07, 2025, 12:17:36 amWhile that is true, I find that for the things I want to use an ADC for I really don't care about calibration, but mostly about continuity and monotonicity. Even linearity isn't all that important. I just want to be able to reliably spot a trend when one starts.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 07, 2025, 02:49:20 am
content: Some MCUs have an auto-calibration feature that improves the offset & gain error quite a bit. Many STM32's have that. You need to launch the calibration using some registers (or using the HAL function if you use HAL), it's not done automatically when you enable the ADC. You'll still have differential and integral linearity errors, but these are (usually) significantly lower comparatively.

author: peter-h
author_rank: Super Contributor
timestamp: January 07, 2025, 09:08:36 am
content: QuoteFactory calibration is easy to do. I have a < 0.01% accurate calibrator for the analog part of my last product, and the whole operation takes no time at all. In fact for volume it could be fully automated (no knobs to twiddle). The cal coefficients are stored in a FLASH.Factory cal is often necessary even if the ADC has super low zero and linearity, simply because Vref isn't much good. You pay loads of money for a good reference, but often a TL431 and factory cal is good enough. I am using an ADS1118 which has amazing specs but a 0.5% Vref.QuoteThey do indeed but it's a bit mysterious how good it is, so I never used it. Well, I use it for the on-chip temperature sensor which is obviously not possible to calibrate externally (without major hassle - see the other thread about on-chip temp of 32F4 chips).I think the noiseismostly random for on-CPU ADCs - simply due to so much RF emitting crap right next to it.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 07, 2025, 01:05:28 pm
content: I started myself with a PIC16F84 Back then it was the only cheap uC. All the others still had ceramic packages with windows to be UV erasable, and those packages were expensive.Didn't like the horrible crippled assembly, so threw it aside quite quickly.Then AT90S2313 happened. Nice instruction set, Electrical erasable, GCC available and also cheap enough to not care about the price. I had a lot of fun with those, and their bigger brothers (ATMEGA8, 32, 328 and such).For the last 15 years I started disliking Atmel. Different programming interfaces every 3 year. Incompatible uC families (tinies, later Xmega's) for no apparent reason, and even simple peripherals change each time, which makes it hard to write a "universal" library that "just works" on (slightly) different uC's.I thought a while of upgrading to the Xmega's, when my uC's became too slow to drive TFT displays, but the XMega's were very different from the Mega's I was used to. I finally settled on Arm Cortex. I went with STM32, but here are lots of others, from the ATSAM, to the LPC.Just forget about 16 bit uC's. "The market prophets" have been attempting to talk the 8-bitters into obsolescence form the '90-ies to well into this milennium, but they are still going strong. The 8-bitters will stay (Especially when compatibility with a 5V power supply is a bonus). And while the 8-bitters stayed, the 16 bitters never got much traction and have been superseded by the 32 bitters. (Although I think that ARM Thumb instruction set is some kind of mix between 8-bit and 32 bit, but I only program in C and C++ and did not look too closely at the instruction set).I bought some "blue Pills" with STM32F103C8T6 when those still were real, but those have been pushed out of the market almost completely by the clones, and I have no interest in debugging those. WeAct has some nice breakout (F411 F431 and more) boards you can put onto a Breadboard. I never liked the big Nucleo boards from STM and their integrated programmer (which doubles the cost of the boards). I've been stuck into a "Getting started with STM32" for 10+ years. The complexity of the IC's is one part of it, and I have a hate / love relationship with STM32 Cube (which got renamed at least 3 times in those 10+ years). for STM32 you sort of need it, to set up the clock domains and distribution, and that works. Unfortunately STM is also pushing the "advanced" things. I dislike the HAL, but the LL is pretty acessible and easy to understand. It's a simple compatibility layer just a bit higher then direct register access. I have been porting parts of the LL into my self written Atmega libraries, to make them compatible with both the old Atmega's, and STM32. It "works", but I'm still having doubts whether it's smart to do so.Another problem with STM32 is the overwhelming amount of data, and their (lack of) organization. There is a very long thread about STM32 and The Cube software on this forum...I will stick with STM32. Both because the invested time and resources (programmers, development boards) and because lot's of chinese gadgets use them From power supplies to complete PLC's (Yes, STM32 with built in 24V power supply and hardened IO for EUR30) but I'm not too keen on recommending this path to someone else.The LPC family is apparently much easier to get started with, but I never used it myself. MBed used to be a very nice site to get a market overview of development boards, but now MBed has stopped, I don't know how long that resource will be available.I also bought some ESP32 boards, and did a few blinking LED projects. The hardware is capable, and it's also popular with hobbyists and hackers (I.e. lost of "getting started" info and tools freely available). But what I really don't like is that the framework compiles a big blob, and then you have to upload MB of data to the thing, which takes far too much time for me. This programming is done many times during a development day, and it gets boring very quickly. A compile and upload cycle for an STM32 is just a few seconds.Teensy 4 may also be interesting. It has an LPC controller (and is quite fast) and it has a very beginner friendly interface. You can even use "arduino" out of the box with this thing. Con is that it's a relatively expensive board, at around EUR30. I'm not sure how the transition path is from "Teensy 4" to "Bare bones LPC".Another consideration (for some) is the packaging for the IC's. Those are ever getting smaller, Do you want to (and can you) solder BGA packages? QFN is apparently easier to solder then QFP, but solder joints on a QFP are easier to inspect (under a microscope)STM32's product range is from small IC's (around EUR1 a piece) up to very big (Hundreds of pins, Megabytes, Ethernet and parallel LCD interfaces). It has a grow path to beyond what I can ever imagine to need from a microcontroller. LPC is also a big family I think, but Espressiv has a quite limited range with just a few models.

author: squadchannel
author_rank: Frequent Contributor
timestamp: January 07, 2025, 01:39:35 pm
content: Quote from: Doctorandus_P on January 07, 2025, 01:05:28 pmyes,yesss!long compile times are enough to demotivate.i would also recommend STM32 to switch from 8bit uCs.

author: tooki
author_rank: Super Contributor
timestamp: January 07, 2025, 01:47:39 pm
content: Quote from: Doctorandus_P on January 07, 2025, 01:05:28 pmAbsolutely. In the past, I sometimes wrote/debugged specific areas of code on an Arduino Uno (Atmega328P) and then ported it to the ESP32 precisely because of that.Imagine my surprise on a recent project where I first tried out an ESP32-C3, which is one of the RISC-V–based ESP32’s, and found that it compiles WAY faster than the classic ESP32.STM32 is still faster to compile (even when using it under Arduino!), but the ESP32-C3 is a lot closer.For anyone who’s curious, the fastest compile times I’ve had anywhere is with STM32 using Keil. But then you have to put up with Keil…

author: peter-h
author_rank: Super Contributor
timestamp: January 07, 2025, 01:56:17 pm
content: Great post by Doctorandus_P above. You get so much power for not much money, so your expertise is not wasted when you move to other projects.Cube MX (the STM "code generator") is handy to get started quickly, and it deals with weird stuff like setting up the clocks. It just saves you reading the RMHAL is code fragments generated by Cube MX. You can use them, or rewrite them, or just read them and pick out the little bit you need. Again, it saves you reading the RM (currently 2000 pages).The dev tool is Cube IDE. I've been using that for the last few years and it is fine. It has many pluses e.g. standalone, no license, no necessary online checks so the project can be archived, etc. This is the long thread on Cube IDEhttps://www.eevblog.com/forum/microcontrollers/is-st-cube-ide-a-piece-of-buggy-crap/I find compilation and linking are very fast. The download to the STLINK debugger takes a similar time. A minute or so in total.But for sure if you just want to blink an LED, there are ways with less of a learning curve.

author: Atlan
author_rank: Frequent Contributor
timestamp: January 07, 2025, 02:37:01 pm
content: Ch32v003 support 5V power.... Stm32f103 is 3V3

author: peter-h
author_rank: Super Contributor
timestamp: January 07, 2025, 03:13:58 pm
content: I would not bother with 5V unless there is some unusual reason. Well, the old RS232 chips like MAX232 need 5V, but you can get MAX3232 which is 3.3V. The 3232 is also cheap because TI's version destroyed Maxim's opportunistic outrageous pricingAlso you may have 5V anyway and using a 3.3V LDO for the digital circuit.

author: Siwastaja
author_rank: Super Contributor
timestamp: January 07, 2025, 04:26:55 pm
content: Quote from: peter-h on January 07, 2025, 03:13:58 pmFor supply yes, but even that uses TTL input levels (in the correct meaning of the term, a trap for many young players used to hear it mis-used, but I'm sure you are aware of what that means) so the inputs are directly compatible from 3.3V CMOS, and the outputs can be shifted with resistor divider or just single series resistor into the input pin of the MCU - although many 3.3V MCUs do have 5V-tolerant input pins available, in which case even that is not needed.Indeed, true 5V CMOS IO is getting a very rare requirement, and in that rare case it is easy enough to level-shift e.g. by using 74HCT buffers.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 07, 2025, 10:12:41 pm
content: Quote from: peter-h on January 07, 2025, 03:13:58 pm5V compatibility is handy for compatibility with Li-Ion or Li-Fe-Po batteries, as 5V uC's are compatible with these batteries. For a 3V3 uC, you need some kind of voltage regulator, and many voltage regulators ave a much bigger idle current then the uC in sleep.

author: NorthGuy
author_rank: Super Contributor
timestamp: January 07, 2025, 10:34:39 pm
content: This discussion really reminds me of this Elephant story:https://en.wikipedia.org/wiki/Blind_men_and_an_elephant

author: brucehoult
author_rank: Super Contributor
timestamp: January 08, 2025, 01:01:43 am
content: Quote from: Doctorandus_P on January 07, 2025, 01:05:28 pmConvolution coding is understandable when you have 12 bit instructions, or 8 bit in other ISAs, but it's starting to get a bit silly when you have 14 bit instructions (as in your PIC16F84) or 16 bit.It's very nice when you have 32 bit instructions and can express "a = b + c" or "if (a < b) goto c" directly in a single instruction -- even if the total code size in bits is similar.QuoteYeah, I haven't seen a point in going to the newer lines if my familiar ATTiny85 or ATMega328 won't do the job.QuoteArm is cool and advanced the industry, for sure. I did sooo much with ARM7TDMI twenty years ago, and RPi and Odroid boards more recently. And Teensy 4. But now I'd rather RISC-V.QuoteYup. Very little point in 16 bit.For $0.10 for an 8 pin package, or $0.15 for 20 pin, the 32 bit RISC-V CH32V003 is a great replacement for both ATTiny85 and ATMega328. It's happy with either 3.3V or 5V (or half a Volt either side of that), has as much RAM as the 328. The flash is less at 16k vs 32k, but code size is smaller, especially if dealing with 16 or 32 bit variables. I guess the only downside is no DIP package, but even a chip mounted on a 0.1" breakout board is still a lot cheaper than a 328.QuoteI'm not sure what that means. It's not :-) You can of course load and store 8 and 16 bit values from RAM, but all calculations are in 32 bit. Same with RISC-V.All instructions in Thumb 1 are 2 bytes long (like in AVR), including BL which looks like a 4 byte instruction but is actually two 2 byte instructions using LR as a tmp value. ARMv6-M as in the Cortex-M0+ makes BL a true (indivisible) 4 byte instruction and adds a couple of CSR instructions to make it a complete stand-alone ISA. Thumb 1 only worked on chips that also implemented the Arm32 ISA (e.g. ARM7TDMI). Thumb 2 (CM-3/4/7) adds lots of 4 byte instructions.QuoteI bought a Teensy 4 the instant they came out in 2019, and loved it.I wouldn't buy one now. The $5 Milk-V Duo does everything the Teensy 4 does but has 64 MB RAM instead of 1 MB, and has a 2nd CPU that runs full Linux. You can program the 64 bit MCU core directly, or use an Arduino library supplied by the manufacturer.QuoteYeah, SOP and SOIC are pretty easy, but of course 0.1" DIP are super easy, and missed with newer chips. Chips already mounted on 0.1" breakout boards can be pretty cheap. You mentioned WeAct:https://www.aliexpress.us/item/1005006217778264.html

author: Siwastaja
author_rank: Super Contributor
timestamp: January 08, 2025, 10:38:44 am
content: Quote from: NorthGuy on January 07, 2025, 10:34:39 pmStill, discussions like this are not useless. Sure, everybody talks about anything important tothem, but even the OP implies ("play with") they have not any specific project in mind. Threads like this are valuable for collecting information from people who have practical experience. Then, when a specific project comes, it offers a better starting point.I have personally learnt a lot on this forum by just reading all sorts of posts.

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 13, 2025, 02:26:03 pm
content: I recommend the STM32G030 over the CH32V003, not as cheap but much better

author: brucehoult
author_rank: Super Contributor
timestamp: January 13, 2025, 10:50:32 pm
content: Quote from: DavidAlfa on January 13, 2025, 02:26:03 pmThat's a bigger part in RAM and flash, more comparable to the CH32V103C6T6 (10k RAM, 32k flash, 64 MHz).Better in what way?

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 14, 2025, 04:36:55 am
content: Quote from: brucehoult on January 13, 2025, 10:50:32 pmIn everything, peripherals, ram, flash, speed...The CH32V103C6T6 is way more expensive, like 3-5x the G030, so not in the same league.They are STM32G041F8P6with AES engine locked down, but the 64KB flash is there along with the extra timers, LPUART and TRNG.STM32G030F6P6STM32G041F8P6

author: brucehoult
author_rank: Super Contributor
timestamp: January 14, 2025, 07:51:12 am
content: Quote from: DavidAlfa on January 14, 2025, 04:36:55 amI see your STM32G030F6P6 on Mouser for $0.68 qty 100 ($1.10 qty 1). 64 MHz, 8k RAM, 32k flash. TSSOP-20. With, yes, 4x the SRAM, but only 2x the flash, and 1.33x the MHz.So that's 4x the price of a 20 pin CH32V003, and it can't run on 5V.I agree -- a completely different league in every way, including price.https://mou.sr/3Mp7EBYCH32V103 seems to be not so easy to get, but I see in the official WCH store on Ali CH32V203F8P6 $0.64 qty 20, 144 MHz, 20k RAM, 64k flash, 17 GPIO, 2*9ch 12 bit ADC, USB2 FS host&device, 2 UART, I2C, SPI, TSSOP-20.So compared to your STM that's 2.25x the MHz, 2.5x the RAM, 2x the flash, for 0.94x the price.And the WCH has got the full RV32IMAC ISA vs the kind of painful Thumb 1. And USB2, which your STM doesn't have at all.https://www.aliexpress.com/item/1005004350448639.html

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 14, 2025, 08:53:33 am
content: Yes for all this, but it's in the end all in what the OP wants to start with and there's no easy answer. I'm sure price for stuff that's all < $1 is not a concern for a "noob" who wants to learn.But price may not be the only point going for the CH32V003: it's a simpler device than the STM32G0 and as such may be easier to grasp for a beginner, while its limitations may not be a big problem for just learning the basics.OTOH, the STM32G0 will allow a bit more - knowing that there are models up to 144KB RAM for $2.5. Still a good deal for a "noob".I would tend to favor the simpler one here, because I personally think that's a better option for learning the basics than going for a more complex MCU right away, which will tend to make things either harder, or push the beginner to use point-and-click tools without really understanding what they do, while it'll be possible to go more baremetal for a beginner on a simpler MCU.Others may of course have a different teaching approach.

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 14, 2025, 09:53:04 am
content: You get the ch32v003 for 30cents in AliExpress (Unless you buy 2000?), the stm32 for 40 cents or so, so not that big difference.

author: ledtester
author_rank: Super Contributor
timestamp: January 14, 2025, 10:31:40 am
content: I'll chime in with the Raspberry Pi Pico... especially if you want something to _play_ with.Some pros:- fast, has lots of memory and comes with two cores- easy to get started with using micro python- easy to flash- has the PIO functional units which people have done some amazing things with- can get it with Wifi/Bluetooth radios- has a large hobbyist user baseSome Pico projects which make use of the PIO functionality:400 MHz / 24 channel expandable logic analyzer:https://hackaday.com/2024/12/12/pico-logic-analyzer-gets-new-version/PicoVGA library:https://hackaday.com/2021/06/11/vga-library-for-the-raspberry-pi-pico/https://www.breatharian.eu/hw/picovga/index_en.htmlArb Waveform Generator:https://www.instructables.com/Arbitrary-Wave-Generator-With-the-Raspberry-Pi-Pic/

author: brucehoult
author_rank: Super Contributor
timestamp: January 14, 2025, 10:46:48 am
content: Quote from: DavidAlfa on January 14, 2025, 09:53:04 am$11.14 for 50x 20 pin = 22.28c each.https://www.aliexpress.com/item/1005005036714708.htmlQuoteI know the CH32V003s I point to are genuine parts from the official WCH store, and I buy there with 100% confidence, just as I would buying STM at Digikey or Mouser.I really have ZERO idea which of the dozens of Aliexpress stores selling STM are genuine parts, new etc etc.Perhaps you can advise, with a URL, which ones you buy?

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 14, 2025, 03:44:22 pm
content: I bought these but they were much cheaper back then (I got 5x for $1.5):https://www.aliexpress.com/item/1005005631825445.html

author: brucehoult
author_rank: Super Contributor
timestamp: January 14, 2025, 11:19:53 pm
content: Quote from: DavidAlfa on January 14, 2025, 03:44:22 pmHmmThe STMicro chips I've seen all have one or more of1) "STM" in the part number printed on the chip2) the ST logo3) the ARM logoThis chip has none of those!

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 14, 2025, 11:36:13 pm
content: This is clearly not a STM product. One bet would be the N32G030, a "Nation" product. They have a TSSOP-20 package. Cortex-M0 based, 48 MHz max.From the datasheet I found, the currrent TSSOP-20 would be the N32G030F6S7, I can't see the F6P6 listed, but given this is the same way of identifying the packages, I would venture that the one on the picture above is indeed a N32G030 in TSSOP-20, but in a revision that is not sold anymore. Which would mean that not only is this definitely not a STM product, but a Nation one, it would even be old stock (assuming the picture is indeed what you get when you order).

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 15, 2025, 01:44:48 am
content: Clearly, the st logo has been removed / photoshopped, lots of vendors do so, I'll check the chips later.Edit: They have the logo, but hmm, maybe the pins are revealing something fishy?The marking looks perfect, I've never seen a relabeled part looking good, and there's a lot to remove:The pins look vastly different:Not all stm32s have the ARM logo.Definitely not present in small packages?This is a genuine picture from an european distributor:Seems very close to the AliExpress one, but not identical, the 4s look different, could be a nicely done copy or a just produced in a different fab.