How do you search for a microcontroller ? - Page 1
Forum section: electronics / general

author: theoldwizard1
author_rank: Regular Contributor
timestamp: April 16, 2024, 10:08:39 pm
content: I am thinking of a project. It would be best if done with an FPGA but that is way beyond my skill set (30+ year retired EE), but I could do a reasonable prototype with a FAST microcontroller.Preferably ARM based32 bitNo MMUSPI (preferred) or I²C>16 output pins w/latchesNeeds to be FAST (>100MHz; >500MHz even better)Because of this, it needs to execute from onboard static RAM/cache; boot Flash can be external.prefer Harvard architecture>8K of I memory; 4K of D memoryI am not looking so much for the "perfect" solution, but a method of searching for what is available !

author: Kim Christensen
author_rank: Super Contributor
timestamp: April 16, 2024, 10:15:35 pm
content: I'd just go to a supplier like DigiKey and do a parametric search using those parameters.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 16, 2024, 10:34:01 pm
content: These specs fit almost any kind of ARM Cortex M MCU these days, except maybe for the very bottom range. So there's like thousands of matching references.Although you need to define what you want to do with "FAST", because without context, that requirement may not be very helpful.*As to Harvard", you also need to tell us more about the rationale. Most CPU these days are some kind of hybrid Harvard which allows them to transparently read data from "instruction" memory and even execute code from "data" memory, while they may internally have separate busses and separate caches.

author: Smokey
author_rank: Super Contributor
timestamp: April 16, 2024, 11:08:15 pm
content: Step 1: Start with a uC that you are already familiar with, already own the programmer for, and have previous code projects to start from.Step 2: See what's in stock at Digikey.Step 3: ...Step 4: Profit!

author: josfemova
author_rank: Contributor
timestamp: April 17, 2024, 12:35:04 am
content: Sounds like the job for a Cortex M7-based MCU- ST has the STM32H7 linehttps://www.st.com/en/microcontrollers-microprocessors/stm32h7-series.html- Microchip has the SAME7x/V7x/S7xhttps://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/32-bit-mcus- working with serial protocols in this one can be disorienting because everything is control by SERCOM peripheral and the mux tables are huge- NXP has the i.MX RT serieshttps://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus:IMX-RT-SERIESYou can look for more in digikey as pointed out by others. If you were looking for a devboard, Teensy 4.1 and Nucleo-144 boards could be options to consider, here's a list:https://www.digikey.com/short/bzp43qtrTeensy boards seem to have a nice reputation. I have not used one yet so I couldn't share my personal experience with them, but many people swear by them. More info on the 4.1 can be found here:https://www.pjrc.com/store/teensy41.htmlEDIT: forgot to mention, Teensy is based on i.MX RT

author: luiHS
author_rank: Frequent Contributor
timestamp: April 17, 2024, 01:01:41 am
content: The NXP RT series is the best, and cheap, I already use the RT1064 for everything. For other jobs that require playing video I use ST's STM32H747.The ideal is to focus on a few microcontrollers, if possible on just one better. For me the NXP RT series is the best, if they had a model with hardwareJPEG decoding they would be perfect for making video players that I need for some projects.

author: brucehoult
author_rank: Super Contributor
timestamp: April 17, 2024, 01:02:41 am
content: These are pretty boring specs these days, especially if 100 MHz is enough. That's not fast.You don't say whether you want a chip or a board. Often a chip on a board doesn't actually cost any more.As others have said, in the Arm world the Teensy 4.x for about $20 simply kills those specs with 600 MHz (overclockable to 960+), 1 MB SRAM, 2 MB flash.But that's old and you can do better now. e.g. for $5 you can get the Milk-V Duo, a 1.0 GHz 64 bit RISC-V running full (command line) Linux in 64 MB of RAM, plus a 2nd 700 MHz 64 bit microcontroller core. I don't remember how much SRAM is available for the microcontroller to run from, but it's far more than you asked for.You can, if you want, edit and compile your code on the board itself (via ssh or serial terminal. Pop the binary for the microcontroller program into a special directory on Linux and BOOM! it's programmed.For $5!Heck, even the very first RISC-V chip for sale in 2016, the SiFive FE310 on the HiFive1 (also available bare for $5) ran at 320 MHz with 16 KB data SRAM and 16 KB icache (reconfigurable to a split icache/ITIM in the 2nd revision). The HiFive1 had 16 MB of external SPI flash for the program.You asked about Arm, but RISC-V has very little practical difference, even if you want to program in asm.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 17, 2024, 01:39:42 am
content: Quote from: theoldwizard1 on April 16, 2024, 10:08:39 pmWhat parts need to be fast / best done in FPGA ? Your MCU choice is likely to skew in that direction.There are MCUs like the Pi PICO RP2040 that has a state machine peripheral that can do FPGA-like work.Also a bit FPGA-like, is the Parallax P2X8C4M64P, which has 8 x 180MHz RAM execution 32b cores, and very configurable smart peripheral pins.

author: luudee
author_rank: Frequent Contributor
timestamp: April 17, 2024, 02:08:34 am
content: Just for fun, I asked "https://agentgpt.reworkd.ai/" this question "which is the fastest mcu, ARM based ?"This was the reply:There are several ARM-based microcontrollers (MCUs) that are known for their high speed and performance. However, it is important to note that the "fastest" MCU can vary depending on specific requirements and metrics such as clock speed, core architecture, instruction set, and application needs.Some popular high-performance ARM-based MCUs include:1. STMicroelectronics STM32H7 series: These MCUs are based on ARM Cortex-M7 core and offer speeds up to 480 MHz.2. NXP i.MX RT series: These MCUs are based on ARM Cortex-M7 or Cortex-M4 cores and can reach clock speeds up to 600 MHz.3. Microchip SAM S70 and SAME70 series: These MCUs are based on ARM Cortex-M7 core and offer speeds up to 300 MHz.4. Texas Instruments Sitara AM335x series: These MCUs are based on ARM Cortex-A8 core and can reach clock speeds up to 1 GHz.5. Renesas RX700 series: These MCUs are based on ARM Cortex-M4F core and offer speeds up to 240 MHz.It is essential to consider the specific requirements of your project and consult the technical specifications of different MCUs to determine the best fit for your needs.

author: brucehoult
author_rank: Super Contributor
timestamp: April 17, 2024, 02:23:26 am
content: Note also that the speed/latency with which you can toggle a GPIO is likely to be far lower than the CPU MHz -- some things I've looked at can't put out a square wave from a GPIO (using software toggling) at more than about 20 MHz even on a CPU running many hundreds of millions of instructions per second. That is a big difference from FPGA. SPI and PWM can likely go higher.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 17, 2024, 02:30:42 am
content: Yes, given the clock rate range the OP gives, mixed with the min. memory requirements (which are very low by today's standard for MCUs), and the fact they acknowledge a FPGA would be more appropriate, one can reasonably infer that what they need is indeed implement relatively simple, but potentially "high-speed" logic, on a MCU.So, as others have mentioned, a RP2040 may be a good fit, provided that the GPIO max clock speed fits - which is actually pretty high. Over 100 MHz has been routinely observed without any issue. Never expect much more than this though.For many MCUs, it will be much lower than this. Including more "powerful" ones.The NXP iMXRT series might work if you can use the FlexIO thing for what you have in mind.The Parallax chips may be a more flexible alternative, although their architecture is relatively odd. Alternatively, there are also the XMOS chips which are neither FPGAs nor MCUs (in the common sense) but programmable in a dialect of C and are very capable. Cost may be a factor though.

author: josip
author_rank: Regular Contributor
timestamp: April 17, 2024, 06:17:02 am
content: Quote from: brucehoult on April 17, 2024, 02:23:26 amIMXRT will toggle GPIO at 20MHz if standard GPIO (outside of M7 domain) is used. But if HS GPIO (M7 domain) is used, it will toggle about 150MHz.https://community.nxp.com/t5/i-MX-RT/High-speed-GPIO1-on-a-MIMXRT-1020-EVK/m-p/1280609

author: TimCambridge
author_rank: Regular Contributor
timestamp: April 18, 2024, 01:21:03 am
content: Quote from: Kim Christensen on April 16, 2024, 10:15:35 pmI agree. But the search options are very limited and there's no query system to formulate your own search. e.g. How do I find all the "STM32 with USB HS PHY and N channel ADC...."? And that's a pretty constrained query. Answer: try Goog.

author: Perkele
author_rank: Regular Contributor
timestamp: April 18, 2024, 07:52:21 pm
content: Since you want to execute from RAM, what would be the ideal size?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: April 19, 2024, 01:29:08 pm
content: Microcontrollers with built in programmable logic are becoming more common. I do not known what parts (and how much) needs to be "fast" (or how fast) but one of those might be interesting. The RP2040 has some weird periphal that runs on a separate program / state machine. Never used it myself, I believe it's some kind of programmable shift register with extra functions.But as others already wrote, 100MHz is jelly bean boring these days, and there are lots of uC's that run on several hundred MHz. Multi core uC's are also becoming more common. With a multi core uC, you can dedicate one of the cores to a specific task, without having to interrupt it for "house keeping" etc.

author: MarkT
author_rank: Frequent Contributor
timestamp: April 19, 2024, 07:38:08 pm
content: I'd put another vote in the the Teensy 4, active ecosystem and its faster than you might think with full dual-issue at 600MHz means 1.2GFlops is possible, single single floats. It also has hardware double floats though a little slower. Certainly quite an easy platform to get a feel for quickly.

author: brucehoult
author_rank: Super Contributor
timestamp: April 20, 2024, 05:38:08 am
content: Quote from: MarkT on April 19, 2024, 07:38:08 pmI very much doubt that a M7 can dual-issue FP instructions with other FP instructions. Two int, an int and an FP, something and a branch ... sure.I think the M7 is somewhat similar to the A53 (other than one being 32 bit and the other 64 of course) in averaging maybe 1.3 IPC on most code, unless it's very carefully hand-written. Newer designs with early&late ALUs in the 2nd pipe (A55, SiFive U74 etc) are more like 1.6 IPC.The cheaper 1.0 GHz single-issue RISC-V boards (generally with THead C906 core) will run more instructions per second on real code, and are 64 bit, have full FPU (and MMU) and even a 128 bit vector unit.

author: tellurium
author_rank: Frequent Contributor
timestamp: April 20, 2024, 12:47:44 pm
content: Quote from: luiHS on April 17, 2024, 01:01:41 amDo you do custom PCB design, or use something ready-to-go like Teensy 4.1 ?The 1064 is BGA as far as I remember, so it is not trivial to assemble.

author: jnk0le
author_rank: Regular Contributor
timestamp: April 24, 2024, 12:13:00 am
content: Quote from: brucehoult on April 20, 2024, 05:38:08 amOnly 1 FMA per cycle which can't even dual issue with FP loadsQuote from: brucehoult on April 20, 2024, 05:38:08 amCM7 does actually have early/late alu design (1 cycle apart, 1 cycle load to use), only AGU and shift, mov, add, sub instructions can use it (+skewed ones)There are a lot of other things that can tank the IPC:https://github.com/jnk0le/random/tree/master/pipeline%20cycle%20test#cortex-m7

author: nimish
author_rank: Regular Contributor
timestamp: April 25, 2024, 03:40:44 am
content: Pragmatically I'd just go buy any easy to use RP2040 based board since the PIO can replace a lot of low level IO protocols and there's great software support.But if you really want >500MHz you're likely stuck with M7 based parts or Cortex-R5What exactly are you trying to do? The core matters much less than the peripherals

author: ColinB
author_rank: Contributor
timestamp: April 25, 2024, 07:35:28 pm
content: If you want to be successful in picking the right MCU, you probably need to think more specifically about your requirements. How do you know you need 100 MHz or 500 MHz? Because the core speed is only one factor of many.Using smart and suitable peripherals for I/O will allow you to go much faster than simply a super high core clock.For instance, the comments about RP2040 and its PIO system are spot on, it's a very interesting design. Or something like STM32H7 if you need a lot of processing power or math.Interestingly the Cortex-M0+ and Cortex-M23 are unique in that they have an optional single-cycle I/O port, which could make them faster than a big Cortex-M4/M7 if you need to do a lot of high speed GPIO through bit-banging etc.

author: josip
author_rank: Regular Contributor
timestamp: April 26, 2024, 07:17:42 am
content: Quote from: ColinB on April 25, 2024, 07:35:28 pmAs I mention on this topic, some devices from IMXRT M7 familly (for example low cost entry device 1010) are with single cycle (M7 domain) HS GPIO that can togle at 150 MHz, much faster than any M0+ or M23.

author: artag
author_rank: Super Contributor
timestamp: April 26, 2024, 11:54:10 am
content: There are an impossibly large number to select from. As Smokey implies, the learning curve for an unfamiliar one can be brutal - ST are particularly complicated to set up and their Cube system to help generates code that many people despise.If you have any existing systems, use a top-end device within that (eg Teensy within the arduino ecosystem) to produce a POC at low cost in terms of learning effort, and look out for problem areas such as cost, speed etc. You might prototype on teensy and then go to an FPGA with embedded processor once you have a good idea of your needs.Don't commit to a device you have no experience of and have to spend 6 months learning before you can be productive, only to find there's some new requirement, constraint, or bottleneck that forces you to change.

author: Kasper
author_rank: Frequent Contributor
timestamp: April 27, 2024, 04:05:21 am
content: I use Digi-Key for more serious searching but if I just want something quick and easy, I'll see what Adafruit and Sparkfun have.They seem good at selecting components and their example code is usually helpful.Into RP2040 lately, Adafruit has nice boards with extra features and example code.Seeed has very small $5 boards.