This problem can only be related to the egr valve. You can try to do a resistance test on all wires between egr valve and pcm. You can also make sure no vacuum lines are clogged or leaking, this is usually caused by clogged egr passages so you may want to make sure they are clean and use a metal coat hanger to clean along with cleaner, the problem could also be the boost sensor vacuum solenoid, The boost sensor should read about 4.5 volts with no vacuum and about 1.3 volts with vacuum, improperlly installed egr gasket could cause this problem. Here is a code definition and location picture of boost solenoid and boost sensor. If you cannot find problem with this information you may need to bring vehicle to shop with high end scan tool so they can moniotor pcm operation or calibrate needed sensors.
EGR BOOST SOLENOID VALVE INSPECTION
P0400 EGR System Flow Malfunction