Good comprehensive answer.
Few things jump out.
1) It's not a fuel issue .
They are completely fine. Battery is new, and about two weeks ago I cleaned oxidation from the terminals and applied Wurth dielectric paste. The terminals are now connected rock solid and there is no oxidation. (The problem was also happening before).2) Go and check that the -ve and +ve battery posts are clean and firmly attached, a loose connection there might be enough with the extra load of the injectors at high RPM and WOT to cause a bad earth which will kill the car.
Just to be sure, we are talking about the sensor at the front of the car, just below the commonrail? Not the other one deep below?3) Take a look at the camshaft position sensor as Jimbo said. Pull it out and check for dirt/debri on the sensor, cracks in it and/or on the wheel. You have a circuit code so it may be circuit related - though as it is repeatable it is likely not.
One slight curveball is that the engine can get Cam and Crank sensor confused - either can give sudden shut down, but lets stick with teh cam sensor first.
4) I'm going to guess that the other codes have been there since the battery voltage dropped on a start - prompting the need for a new battery. I would clear all the codes so we have a good base in case we don't fix it first try!
5) your generic code reader shoud have picke up the P0340 as it is an OBD2 code.
6) - Bleeding 'ell this is my 1001th post- I must get out more!
No don't replace the filter yet.
I have put it on the terminals + on everything after I clamped it. It seems everything works fine, for about a month now. No oxidation whatsoever.Did you put the Wurth Dialectric on the posts before you put the terminals on or after ? Great for keeping muck off - but it's an electrical insulator.
After I cleaned everything, I couldn't reproduce the error on a drive. I tried to press the car hard and the engine didn't cut off. I also cleaned the contacts with WD40, so maybe that helped too.Yes the Cam sensor is the one you pulled, looks pretty nasty is it better wiped off?
I cleared the errors, and now I need to drive a bit to see if the errors will return.You can test them for working or not, but you are not going to be able to test for breakdown at high RPM without a scope.
Yes now everything is cleaned up and the cam sensor is replaced firmly in its slot and not bolted down too tight, clear the codes, see if you can repeat the issue and re-read the codes.
From the look of the sensor, if it repeats and unless you have an oscilloscope and back probes we might just have to say replace it. Get a decent brand from a reputable supplier. Either a motor factor or one of the better ebay suppliers. PIM for example: https://www.partsinmotion.co.uk/car...int-camshaft-position-sensor-adj137213-detail
Just checking about the battery grease, it has been known for people to think it improves connection. looks like a good job on yours.
Yes the RPM oscillation could well be linked to the Cam sensor.
All you have left there is the radio network comms issue.
Fingers X'd you might have fixed it!
Is there any way to test the pedal with logger from sdd?There's a couple of faults that the ecu will cut the engine on that I know of, and have experienced for myself, the 1st one being faulty/worn accelerator pedal. There are 3 position sensors on it, and if one becomes erratic the ecu notes this and uses the readings from the other 2, but logs a fault. If it logs more than a certain number of faults, then the ecu will cut the engine. You should be able to read a fault code if the EML light is flashing, maybe your reader isn't compatible with the car. The other fault that results in the ecu cutting the engine, is fuel rail pressure lower than expected.... once again, if the ecu logs this fault a certain number of times (with the EML light) the ecu will cut the engine. For me, my high pressure pump only delivered 850 Bar, and I got used to the engine cutting out as I hadn't noticed the EML light flashing and I'd just coast while switching off then restarting the engine, the only trouble being at night when the headlights would go off momentarily. Once again it will certainly log a fault... perhaps your reader isn't compatible.