Author Topic: How do you search for a microcontroller ?  (Read 3598 times)

0 Members and 1 Guest are viewing this topic.

Offline theoldwizard1Topic starter

  • Regular Contributor
  • *
  • Posts: 172
How do you search for a microcontroller ?
« on: April 16, 2024, 10:08:39 pm »
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 based
  • 32 bit
  • No MMU
  • SPI (preferred) or I²C
  • >16 output pins w/latches
  • Needs 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 memory
       
I am not looking so much for the "perfect" solution, but a method of searching for what is available !
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1327
  • Country: ca
Re: How do you search for a microcontroller ?
« Reply #1 on: April 16, 2024, 10:15:35 pm »
I'd just go to a supplier like DigiKey and do a parametric search using those parameters.
 
The following users thanked this post: nimish, Dazed_N_Confused

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14494
  • Country: fr
Re: How do you search for a microcontroller ?
« Reply #2 on: April 16, 2024, 10:34:01 pm »
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.
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2599
  • Country: us
  • Not An Expert
Re: How do you search for a microcontroller ?
« Reply #3 on: April 16, 2024, 11:08:15 pm »
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!
 
The following users thanked this post: artag, Geoff-AU

Offline josfemova

  • Contributor
  • Posts: 25
  • Country: cr
  • Tropical FW dev
Re: How do you search for a microcontroller ?
« Reply #4 on: April 17, 2024, 12:35:04 am »
Sounds like the job for a Cortex M7-based MCU
- ST has the STM32H7 line https://www.st.com/en/microcontrollers-microprocessors/stm32h7-series.html
- Microchip has the SAME7x/V7x/S7x https://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 series https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus:IMX-RT-SERIES

You 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/bzp43qtr

Teensy 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.html

EDIT: forgot to mention, Teensy is based on i.MX RT

« Last Edit: April 17, 2024, 01:02:50 am by josfemova »
 

Offline luiHS

  • Frequent Contributor
  • **
  • Posts: 592
  • Country: es
Re: How do you search for a microcontroller ?
« Reply #5 on: April 17, 2024, 01:01:41 am »

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 hardware
JPEG decoding they would be perfect for making video players that I need for some projects.
« Last Edit: April 17, 2024, 01:05:01 am by luiHS »
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4040
  • Country: nz
Re: How do you search for a microcontroller ?
« Reply #6 on: April 17, 2024, 01:02:41 am »
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.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1555
  • Country: au
Re: How do you search for a microcontroller ?
« Reply #7 on: April 17, 2024, 01:39:42 am »
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.

What 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.
 

Offline luudee

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: th
Re: How do you search for a microcontroller ?
« Reply #8 on: April 17, 2024, 02:08:34 am »

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.


 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4040
  • Country: nz
Re: How do you search for a microcontroller ?
« Reply #9 on: April 17, 2024, 02:23:26 am »
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.
 
The following users thanked this post: ColinB

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14494
  • Country: fr
Re: How do you search for a microcontroller ?
« Reply #10 on: April 17, 2024, 02:30:42 am »
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.
 

Offline josip

  • Regular Contributor
  • *
  • Posts: 152
  • Country: hr
Re: How do you search for a microcontroller ?
« Reply #11 on: April 17, 2024, 06:17:02 am »
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.

IMXRT 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
 

Offline TimCambridge

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
Re: How do you search for a microcontroller ?
« Reply #12 on: April 18, 2024, 01:21:03 am »
I'd just go to a supplier like DigiKey and do a parametric search using those parameters.

I 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.
 

Offline Perkele

  • Regular Contributor
  • *
  • Posts: 50
  • Country: ie
Re: How do you search for a microcontroller ?
« Reply #13 on: April 18, 2024, 07:52:21 pm »
Since you want to execute from RAM, what would be the ideal size?
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3369
  • Country: nl
Re: How do you search for a microcontroller ?
« Reply #14 on: April 19, 2024, 01:29:08 pm »
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.
 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: How do you search for a microcontroller ?
« Reply #15 on: April 19, 2024, 07:38:08 pm »
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.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4040
  • Country: nz
Re: How do you search for a microcontroller ?
« Reply #16 on: April 20, 2024, 05:38:08 am »
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.

I 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.
 

Offline tellurium

  • Regular Contributor
  • *
  • Posts: 232
  • Country: ua
Re: How do you search for a microcontroller ?
« Reply #17 on: April 20, 2024, 12:47:44 pm »
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.

Do 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.
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline jnk0le

  • Contributor
  • Posts: 41
  • Country: pl
Re: How do you search for a microcontroller ?
« Reply #18 on: April 24, 2024, 12:13:00 am »
I 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.
Only 1 FMA per cycle which can't even dual issue with FP loads

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.

CM7 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
 

Online nimish

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: How do you search for a microcontroller ?
« Reply #19 on: April 25, 2024, 03:40:44 am »
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-R5

What exactly are you trying to do? The core matters much less than the peripherals
 

Offline ColinB

  • Contributor
  • Posts: 26
Re: How do you search for a microcontroller ?
« Reply #20 on: April 25, 2024, 07:35:28 pm »
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.
 
The following users thanked this post: nimish

Offline josip

  • Regular Contributor
  • *
  • Posts: 152
  • Country: hr
Re: How do you search for a microcontroller ?
« Reply #21 on: April 26, 2024, 07:17:42 am »
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.

As 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.
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1078
  • Country: gb
Re: How do you search for a microcontroller ?
« Reply #22 on: April 26, 2024, 11:54:10 am »
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.
 
 

Offline Kasper

  • Frequent Contributor
  • **
  • Posts: 748
  • Country: ca
Re: How do you search for a microcontroller ?
« Reply #23 on: April 27, 2024, 04:05:21 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf