Very strange.
Lexia shows up P0219 'Intermittent fault, Engine speed signal: Excess engine speed'
and P0339 'Intermittent fault, Engine speed signal: Incorrect signal'
LEXIA (you can find them on eBay) is the citroen tool for engine diagnostics for the Citroen C3 and its the only tool that works for early diesel C3s, but useful for all the Citroen C3s
The engine speed is taken from the crank sensor and fed to the engine ECU via the wiring loom in the engine bay.
The crank sensor
Checks were made on the wiring and plugs to the engine ECU as they are quite easy to get to being next to the battery and everything looked ok. Next stop the crank sensor. Haynes says is quite simple to remove the crank sensor after removing the inner wing, but although the crank sensor mounting bolt is more easily accessible by removing the inner wing, the sensor is fixed firmly behind the crank pulley. It looks like you have to remove the crank pulley to get the crank sensor out. A quick spray of contact cleaner in the electrical connector and the crank sensor socket is all that could be done without stripping things down.
The Crank Sensor electrical connector can be accessed without removing inner wheel arch as can be seen in the photo.
The sensor electrical connection is quite exposed and low down on the engine, picking up dirt and water on the journey.
Subsequent driving shows the fault has cleared, due to the cleaning of the crank sensor connector.

To clean the connector, remove the electrical plug from the sensor, spray some Electrical Contact Cleaner onto the plug and socket contacts, refit the plug to the crank sensor and start the engine to test.