I apologize if this response is too far off-topic for STM32 dev.
Tjeerd wrote: ↑Mon Feb 08, 2021 10:24 pmI do live in a flat area so no baro issue.
There is still a barometric issue even if staying at one altitude. This is called density altitude, and the baro pressure is affected by temperature and humidity, as well as altitude. This is why we use an intake temperature sensor, as another part of Speed Density fueling calculations based on the
ideal gas law (PV=nRT) .
Tjeerd wrote: ↑Mon Feb 08, 2021 10:24 pmAlso i think most cars with EFI have no baro sensor only MAP.
Almost all do, including all OEM cars I've worked on. Most MAF cars also use a baro sensor to modify the MAF readings, as MAF cannot sense the pressure effects by itself. But, less-dense air would affect the MAF similarly to part-throttle, right? Not quite, in a similar way carburetors are also affected.
Tjeerd wrote: ↑Mon Feb 08, 2021 10:24 pmAnd i still not sure what the reason for a baro sensor is. The MAP already reads a lower value and reduces fuel if it reads less dense air. So i still do not understand the theory why baro is necessary at all for EFI cars using MAP. .
Because air has two commonly interchanged values of density and pressure. However, their effects are different, and carburetor users have had the same enrichment as you go higher (or weather causes lower density) for over 100 years. The effect on EFI is no different, as the lower pressure affects cylinder filling and exhausting, while the density affect available oxygen.
To use a carburetor analogy, they use air flow to pull fuel, and more air flow pulls more fuel. Cool. But while the air is lower density, it is also lower pressure with lower oxygen content. In order to offset all of these effects, aircraft carbs and some others use altitude-compensation that also corrects due to pressure effects, usually a big diaphragm housing on the carb or a crude manual mixture adjustment.
So, Speeduino (and other EFI systems) reads the baro value for relative effects at power-up. It even offers baro correction for Alpha-N (TPS-RPM) with no MAP sensor. Then it's corrected, but only at that moment, at that baro value. Real-time baro sensing allow ongoing corrections as weather or altitude change, with obvious benefits to correct fueling for whatever you're doing. I hope that helps.
David