Showing results for 
Search instead for 
Did you mean: 

H7 single-core vs. dual-core

Associate III


I am considering which solution to go for in a new product. To start with, I am going for a 480 MHz STM32H7 with high-resolution timer (HRTIM) for some quick PWM regulation. The regulation feedback is supposed to come from a fast ADC, so I need to make some quick code to determine a new PWM value from an ADC value. Possibly with some PID in between.

Apart from this, I will have some slower stuff running, such as serial communication, ADCs for monitoring, non-volatile RAM etc. Things that aren't in a big hurry.

I read about the dual-core microcontrollers, with a Cotex-M7 core and a Cortex-M4 core in the same pakcage, and I initially thought that they looked quite interesting. However, as I read the STM32H745 datasheet, the high-res timer and the ADCs are not in the same domain as the fast M7 core. It seems like the only features and peripherals that the M7 core can control directly, are things that I probably won't even need. To control an ADC, read its value, and set a PWM value in the HRTIM, the M7 core apparently needs to go through a bunch of bus multiplexers.

So, those of you who might have some experience in this – is it really worth it?

After studying the dual-core microcontrollers. I feel more like going with an H7 single-core microcontroller, to reduce the complexity. I guess that I can keep the slow stuff in the main loop and low-priority interrupts, and the quick things in high-priority interrupts.

Are there things I haven't considered, that makes dual-core controllers more desirable?


The big question: is it feasible at all, concerning ADC and control / reaction speed?

This is more important than single / dual core, I'd say.

So what's your ADC sampling rate? And how fast do you want to react?
The STM32 cannot do wonders and do parallel processing, fast ADCs are best handled with data via DMA into buffers, and then processing the buffer.
Sample by sample on the fly via interrupts is very limited, so an FPGA might serve you better.

ST Employee

Hi @EThom.3 ,

Note that STM32H7 Dual core and Single core have the same die and M4 was just disabled by HW in the Single core version.
So your comment about the clock domain is available also for single core and you have 240MHz max on D2 domain.
The AN5557 may gives you an idea about the usage of dual core (mainly read the section 4 Application partitioning examples).

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Associate III

We have considered using an FPGA, but would very much like to avoid that.

While the micorcontrollers in question boast ADC sample rates in the MHz range, I don't intend to go quite that fast. I am considering something like 240 of 480 ksamples/s, and adjusting the PWM for each sample.

@SofLitThanks a lot. I'll have a look.


How many channels at these sampling rates? And each channel with that effective SR, or time-muxed? 

Associate III


Most likely one channel only.

Okay, then at (for example) fs = 400 kHz and CPU at 400 MHz, you'll have about 1000 cycles for working on that sample and other stuff.
Don't forget that function calls take some cycles, and even some data paths to / from the peripherals also don't happen instantly.

That sounds feasible, so dual core depends on the math you do and other stuff going on...

Sorry for the probably not so helpful answer! 😉

Associate III

Thanks, LCE. I appreciate your answer. 👍

I think that I'm going for a single core H7 for two main reasons. I believe that the channeling of HRTIM and ADC values through all the bus matrices will take extra time, especially when needing to avoid collisions with the slower M4 core. In addition, I am not convinced that the questionable added value will be worth the extra complexity.

I'm used to getting a lot of stuff done in 8-bit microcontrollers, running at a fraction of the clock frequency that the H7 microcontrollers can run at. So while I'm not the most advanced programmer (I don't design shiny IoT devices with graphical displays and MP3 decoding), getting stuff done within as few instruction cycles as possible is one ability I believe that I do have. 😉

Thanks again!

I'm used to getting a lot of stuff done in 8-bit microcontrollers...

Same here! 🙂

I found that people coming from 8-bitters are much better at not wasting resources, compared to those coming from pure computer programming - "where are my giga bytes of RAM?" 😉