P0400 - EGR Flow Malfunction
P0401 - EGR Flow Insufficient
P0501 - Vehicle Speed Sensor (VSS) Circuit Malfunction
The only real component in the system that can monitor EGR flow is the MAF sensor. There is no differential EGR flow detector like those used with gas engines.
So, the question is, what can cause EGR flow DTC codes?
A bad MAF sensor.
A bad vacuum pump or loss in vacuum (leaking lines/hoses), which means the EGR valve won't open.
A bad EGR solenoid, which is a vacuum switch that controls the EGR valve.
A bad turbocharger wastegate solenoid, which can affect incoming airflow over the MAF sensor.
A plugged catalytic converter will restrict exhaust flow resulting in excessive backpressure in the exhaust system, which reduces the intake airflow read by the MAF sensor. Removing the cat/muffler could still produce EGR flow codes because the EGR system was calibrated to work as a complete system. A total loss of restriction would alter the flow dynamics.
Always begin a troubleshooting process by carefully examining the related wiring and electrical connectors. Some these tests can be performed using a Tech II scan tool from the driver's seat. Might be worth the 1/2-1 hour of shop time at a dealership if the tech knows these diesels.
Otherwise:
1- Measure the vacuum.
2- If vacuum pump and lines are OK, replace EGR solenoid.
3- If that didn't help, replace wastegate solenoid.
4- If that didn't help, measure exhaust system pressure differential across the catalytic converter to determine whether the cat is plugged. Replace cat if above about 3-psi at WFO (a hard run). Test this by drilling a 1/8" hole in the exhaust system right before/after the cat, install pressure fittings, do pressure test, then weld holes closed if pressure is OK. Most cats slowly plug over time. A few years of driving is enough to completely plug a cat when the vehicle is lightly driven in cooler climates.
Jim