Help me find a suitable microcontroller

Hi there!

I've started to think about making a rack based, expandable I/O system.

I'm looking for an MCU which can handle:
-Many SPI ports (preferably at least 6) which is able to handle high frequencies
-Multiple USARTs (at least 2 plus 1 for debug)
-About 40 spare GPIOs

It's better if it can be programmed in arduino (for prototyping)

I still have to find out how to connect it to a computer. It needs to be fast but easily accessible by software. I've already been thinking about serial over USB but some sources say that it's limited to the a set baud rate and some say that it practically uses the full bandwidth if possible.

I'll learn to use other IDEs if I have to so it's not a problem.

---EDIT: added a general description of my project---

A few words about the project:

It would be a smart home control/measurement box system. It will have a backplate which 16+1 slots. The +1 slot would be for a host card (for which I'm looking for an MCU) that makes the connection between the computer and the devices imnstalled into the system. The SPIs are needed to connect devices that need high bandwidth (e.g. analog measurement with high sampling rate, multiple high speed RS485 I/O card etc...). The lower bandwidth cards (e.g. simple I/O card) can be connected by a simple RS485 bus on the backplane.

The host card's MCU must be capable to somehow trick the PC so it will see all the expansion cards as separate devices (?Maybe a virtual USB hub?).

It would help if we had the slightest clue to the mission of the system and what you are connecting to so many I/O ports. With Arduino and port expanders, there's really no limit to how many I/O ports you can have, but at the expense of speed.

Currently the processor with the most bangs is the Teensy 4.0

some sources say that it's limited to the a set baud rate

It depends on if the processor uses an USB to serial converter chip, or if it emulates a straight USB port.

SteveMann:
It would help if we had the slightest clue to the mission of the system and what you are connecting to so many I/O ports. With Arduino and port expanders, there's really no limit to how many I/O ports you can have, but at the expense of speed.

Here you go. (I've edited the original post)

Grumpy_Mike:
Currently the processor with the most bangs is the Teensy 4.0
It depends on if the processor uses an USB to serial converter chip, or if it emulates a straight USB port.

Yes I'm looking for something that has a native USB port but the informationd were - let's say - unclear about the baud rate of them.

a native USB port but the informationd were - let's say - unclear about the baud rate of them.

USB uses a completely different protocol.

A USB device can emulate a serial port at any common Baud rate.

jremington:
USB uses a completely different protocol.

A USB device can emulate a serial port at any common Baud rate.

And could I emulate multiple ports at the same time?

No.

FeriHUN:
Yes I’m looking for something that has a native USB port but the informationd were - let’s say - unclear about the baud rate of them.

For boards with native USB, it is configured using the standard Serial.begin() format to retain source code compatibility with other Arduino boards, but the baudrate parameter is not actually used and the native USB runs at the nominal USB 2.0 rate of 12M bits/second.

MrMark:
For boards with native USB, it is configured using the standard Serial.begin() format to retain source code compatibility with other Arduino boards, but the baudrate parameter is not actually used and the native USB runs at the nominal USB 2.0 rate of 12M bits/second.

So for example will it work with an STM32 board with native USB? Because that’s what I’m looking forward to use. The NUCLEO-H743ZI2 (for prototyping) to be exact.

the quality of the answers is totally dependant on the infomration available.

what do you consider high frequency ?
why do you need 6 channels ?

it is entirely possible that a NANO, with shift registers and port expanders along with external ADC devices is not only fast enought, but has enough memory.

if you want to keep what sensors you are using close to the vest, then it might be wise to get some sensors, get an UNO and start monitoring. through trial and error, find what restrictions you have.
soon enough the areas of problems with speed will show up. and the assumptions of need will be exposed and refined.

At this point, we do not know if you want to get a Ferrari to drive on block at a time in a city when people walking can move faster.

dave-in-nj:
the quality of the answers is totally dependant on the infomration available.

what do you consider high frequency ?
why do you need 6 channels ?

it is entirely possible that a NANO, with shift registers and port expanders along with external ADC devices is not only fast enought, but has enough memory.

Well I need the most possible channels because I have some expansion cards which can only use SPI as communication and are port expanders with high spees interfaces. (like 4 times 20MHz RS485) Don't ask why just trust me, I know why I need such speeds in some cases.

The high frequency means "As high as possible", because the program essentially would run on the connected PC, this is just a high speed I/O. And if I need the data then I need it in the very moment (at least as soon as possible) So I need much faster interfaces to lower the latency between the I/O ports and the PC.

FeriHUN:
So for example will it work with an STM32 board with native USB? Because that's what I'm looking forward to use. The NUCLEO-H743ZI2 (for prototyping) to be exact.

I've used the Arduino environment with STM32F103 boards and it works as I've described above, that is, "Serial" maps to the USB and it ignores the baud parameter when initialized because it is not relevant to USB. "Serial1" maps to the first UART and requires the baud parameter, and so forth.

The H743ZI2 apparently has two native USB ports, so my guess is that Serial and Serial1 map to USB ports and Serial2 etc map to UARTs, but I've not used that board.

I'm curious what you're doing that requires that class of processor and if Arduino is the right development environment to use it. In particular that processor has four DMA controllers (independent controllers, not channels!!!) and I don't know how well exposed such things are under STM's Arduino core. It seems rather like putting bicycle tires on a Ferrari.

MrMark:
I'm curious what you're doing that requires that class of processor and if Arduino is the right development environment to use it. In particular that processor has four DMA controllers (independent controllers, not channels!!!) and I don't know how well exposed such things are under STM's Arduino core. It seems rather like putting bicycle tires on a Ferrari.

I'm only going to use the Arduino IDE for proof of concept. Parallel with the prototyping I'll learn how to use STM's own IDE and for the final "product" I'll use the code written in that one.

Also I'm a bit curious if I could use a DMA controller for high speed serial to parallel conversion and visa-versa. It would be one hell of a sick project.