Im new to the Rpi forum,making this my first post,
I have experience on the ECU side of things and would like to pass some knowledge on about ecus and what to do about some of the challenges you will face with running Rpi as an ECU.
All examples i give will be for 4 cylinder with displacement of 2000cc's,equipped with sequential port fuel injection.sequential coil on plug.
The load is determined by 2 sensors,TPS and Map,so thats throttle position and manifold pressure,wide open throttle = no vacuum/atmospheric pressure.
Part load is where the focus should be,this is where driveability matters.most processor loads are at part throttle,between 1200rpm and 4000rpm,since regular drivers drive in this range more than 80% of the time,accuracy matters in this load range,the resolution should be very high here with good attention to detail.
Load ranges 4000rpm to 7000rpm,you can decrease resolution in these ranges,fuel timing is not critical here,ignition timing becomes primary focus.
Idle is never a problem for even a slow cpu or microprocessor,unless you need rough running correction or cylinder specific timing values,then dont worry about realtime too much here.
I suspect you will need a separate microprocessor to do timing curves,only reason is to implement a failsafe with a default in case of something goes wrong,you can use the Rpi to calculate the correct load and then send values to microprocessor,no value from Rpi = default = failsafe.this method is used in various ECUs to keep things in check,same method should be used for turbo controller,keep it separated and use the failsafe!!!
The fuelling can be controlled from Rpi itself,pulse width accuracy is important,but not the timing of it,you will have a whole 40 degrees crank rotation to "time" the fuel,usually with modern engines,a few deg (2-5 degrees) before opening of the intake valve,depending on intake and exhaust valve overlap,then about 35-40 degrees since the intake valve starts opening,so anywhere in that range will give acceptable idle.at higher rpms this does not matter and save yourself the trouble of implementing sequential fuelling above 4000rpm,you will not need it,fire 1 and 4 together,and 2 and 3 together,same for ignition coils.
Hope this helps!!!