WHICH CORE?!
Posted: Sun Oct 11, 2020 12:42 pm
Hi
the question is simple but the answer is hard:
which core? official or Roger's core?
the question is simple but the answer is hard:
which core? official or Roger's core?
Everything relating to using STM32 boards with the Arduino IDE and alternatives
https://www.stm32duino.com/
Not hard: Official is the professional choice with STM Corporate support. Core built on their professional libraries. Official core provides a supported codebase beyond ArduinoIDE if needs require a migration path.saeed144 wrote: Sun Oct 11, 2020 12:42 pm Hi
the question is simple but the answer is hard:
which core? official or Roger's core?
To my knowledge, there is no direct comparison.windyyam wrote: Tue Oct 27, 2020 11:58 am I have question about the 2 cores too, is there a test for performance? Which one is overall faster? And the storage/memory consumption?
Roger's core uses a lot more RAM and Flash to build the final binary file.windyyam wrote: Tue Oct 27, 2020 11:58 am I have question about the 2 cores too, is there a test for performance? Which one is overall faster? And the storage/memory consumption?
wow, that's an interesting project, I never thought a microcontroller could do that~feluga wrote: Wed Oct 28, 2020 3:43 amRoger's core uses a lot more RAM and Flash to build the final binary file.windyyam wrote: Tue Oct 27, 2020 11:58 am I have question about the 2 cores too, is there a test for performance? Which one is overall faster? And the storage/memory consumption?
In this matter, STM32 Official Core is way better, thus if your sketch needs RAM space, this is the best option.
Talking about performance, I built an Arduino VGA library that has to deal with very tiny timing limitations.
Regarding performance, I found Roger's core faster when it deals with TIMER IRQ callback.
When using STM32 Core it takes maybe 50 to 100 more cycles to start the IRQ, which in my case leaded to a bad VGA image on screen.
To solve it, I had to disable Hardware Timer on the sketch and to use it directly linked to NVIC, avoiding software overhead.
More details about the memory consumption difference at viewtopic.php?f=10&t=347
and about the way I solved the HW TIMER issue on the Github page for this project.
It means that there are performance and consumption differences between both cores, but only when you really need every bit of RAM or every CPU cycle for the job. Otherwise, as MrBurnette said, it's a matter of preference - but it's important to notice that I think that only STM32 Offical Core is being currently updated and evolving.
Yes, thanks for the direction. It makes totally sense that ST's core got more attention as it's more "alive" and have official support.mrburnette wrote: Tue Oct 27, 2020 2:39 pmTo my knowledge, there is no direct comparison.windyyam wrote: Tue Oct 27, 2020 11:58 am I have question about the 2 cores too, is there a test for performance? Which one is overall faster? And the storage/memory consumption?
Consider the monolithic nature of libmaple (Roger's core), my suspicion is that Roger's core will be the smaller compiled bin file, but the Official core may have better performance and peripheral support.
"Fastest" is not a reasonable attribute, rather quality is a better comparison. If you are a professional programmer, the Official core will provide everything you need. If you are a weekend hobby programmer, Roger's core will likely meet your requirements.
Code: Select all
unsigned long lasttick = 0;
void setup() {
// put your setup code here, to run once:
pinMode(PC13, OUTPUT);
Serial.begin(115200);
lasttick = micros();
}
void loop() {
// put your main code here, to run repeatedly:
for(int i=0;i<10000;i++){
digitalWrite(PC13, HIGH);
digitalWrite(PC13, LOW);
}
unsigned long nowtick = micros();
Serial.println(nowtick - lasttick);
lasttick = nowtick;
}
Code: Select all
digitalWriteFast(PC_13,HIGH);
digitalWriteFast(PC_13,LOW);