Thank you for correcting the terminologies. Learning something new everyday.
I haven't got to the conclusion that it's a bad ecu. My cousin also overhauled his baleno engine and experiences somewhat similar issue i.e. stalling when braking and turning but it is rare than mine, as in I can stall at will on idle but on his car I can't. Chances are slim that both our ecu went bad right when we overhauled the engine.
His issue I somewhat identified is that when braking and clutch is pressed while car is still moving, the rpm drops to idle but then goes below it if brake and clutch is still pressed. And when idle is super low and we add steering input it vibrates and then either recovers or stalls but has a hard time when being at low rpm. Mine also dropped rpm when braking for a long time. However it doesn't seem linked to VSS.
Mine is also similar in that first the idle drops, and then the car stalls. Not like it dies straight from 700 to 0. It's the drop to 500 and then being unable to bear the load and stall.
Although you mentioned ecu not moving iacv fast enough, but why would it suddenly be unable to do after overhaul? Don't think it's that because of this.
We both got the iacv gaskit and o-ring so will install those to clear out iacv.
I got a used iat sensor just in case it shows different reading.
Learning quite a lot because of this issue xD although I lose sanity sometimes.
FSM says IAT value at idle at warmed up engine should be around ambient +15C, which at 35c would be around 50c so maybe we're good or maybe iat reports a slightly higher reading, ecu adds less fuel as it thinks air is hot and not too dense (but it is a bit), and we end up with a lean mixture and engine stalls.
Meh just a theory. Also with iat sensor disconnected the car didn't stall. If ecu is slow to move iacv, it would've stalled still, no? It always recovered fine without any hesitation or vibration. So I think ecu can control iacv fine. Some sensor is lying and I have to find out which.
For above context, with all sensor connected, pumping brake and then letting go makes rpm drop lower than 700. Like it keeps falling from 1000 (due to pumping) till 500.
But with iat disconnected, after the pumps it drops gracefully from 1000 and slows down near 700 in a controlled manner, never goes below that.
Now I instantly go to map when I see this because pumping is changing vacuum a lot and then the engine has to adjust. But first I'll try popping out iat sensor (which seems like a hard thing but fsm is like yeah just pop it out easy peasy) and then I'll test it in heating water (as per fsm instructions) and see the resistance to water temp. as per fsm graph.
i couldn't find a vacuum gun type thingy to test map otherwise I would've tested map with that too as fsm shows map voltage at different vacuum levels.
EDIT: In case it points something, stall only happens when engine is at operating temp. never before.