aljazjelen
New member
Hi everyone,
I am new to this forum so a warm hello to anyone reading this!
Several months ago I started working on developing my own ECU for Petrol engine. As I have several MCUs laying around, I took STM32 (the nucleo L053) as a start (since I am also not an expert). For now, I have a working Crankshaft and Camshaft position drivers, as well injector drivers.
Eventhough im using several "performance boosting features" (DMA for example), I started regretting the decision soon after. The major problem is 32Mhz clock, which is insufficient for a timing constraint, especially driving the ignition coils in high RPMs.
On the other side, to emulate all external HW signals, I am using Teensy 4.0
More time I spent digging in the documentation of Teensy (especially 4.0), I am thinking about "swapping the roles between my MCUs". I mean, 600Mhz is a tipping point.
There are 2 questions I have:
I found a very nice topic in regards to "Pulses" in Teensy. https://forum.pjrc.com/threads/61005-Timer-amp-Interrupt-for-delay-width-pulse-generator-Teensy-4-0?p=240634.
Thanks for support,
Aljaz
I am new to this forum so a warm hello to anyone reading this!
Several months ago I started working on developing my own ECU for Petrol engine. As I have several MCUs laying around, I took STM32 (the nucleo L053) as a start (since I am also not an expert). For now, I have a working Crankshaft and Camshaft position drivers, as well injector drivers.
Eventhough im using several "performance boosting features" (DMA for example), I started regretting the decision soon after. The major problem is 32Mhz clock, which is insufficient for a timing constraint, especially driving the ignition coils in high RPMs.
On the other side, to emulate all external HW signals, I am using Teensy 4.0
More time I spent digging in the documentation of Teensy (especially 4.0), I am thinking about "swapping the roles between my MCUs". I mean, 600Mhz is a tipping point.
There are 2 questions I have:
- has anyone done some comparisons in regards of "manipulating registers directly " instead of using the libraries. From timing constraints, is it worth a hassle? Or is performance improvement insignificant?
- has anyone tried some performance tests with TIMs? Like how many us, would the simple input compare and several lines (adding/dividing) interrupt callback function need?
As a comparison, with the abovementioned STM32, I could reach 10-15 us, which is about half a degree at the speed of 9000RPM. So technically my ignition points would have an "accuracy" of 0.5 degrees. Which is a no-go. I want it better.
I found a very nice topic in regards to "Pulses" in Teensy. https://forum.pjrc.com/threads/61005-Timer-amp-Interrupt-for-delay-width-pulse-generator-Teensy-4-0?p=240634.
Thanks for support,
Aljaz