It's not low fuel pressure that causes it. Quite the opposite it's to much fuel.
I'm guessing the chip you have plugs into the fuel rail as it's very common for these style of chips to play up on the D40's (seem to be fine on most other models/cars etc). The reason is it raises the fuel pressure because more fuel means more power and the D40 doesn't have a lot of tolerance for pressure increases from factory. (Some dealers oversea's have done this modification because even at factory settings without chips different ambient temps, altitudes and fuel types can cause fuel pressure problems in some countries)
How to stop limp mode...
Things/tools needed :-
THE PICTURES ARE NOT FROM THE D40 BUT IT LOOKS THE SAME IN SIDE AND IN THAT ORDER.THERE ALREADY A SHIM IN THE D40,YOU NEED TO ADD 1 MORE.
1st you need a shim ( washer ) Approx 1.5 mm thick.
A 14mm spanner.
Magnetic tray.
Vices and grips.
Take off the engine cover and set aside.
Facing the engine from the front of motor there is the common rail on the left.At the back of the common rail is a 14mm headed bolt,this is the fuel pressure valve.Put the magnetic tray under the 14mm head of the pressure valve and undo VERY CAREFULLY and remove the valve.
Once you have the valve you need to split the valve as shown in the pictures.The way I did it was to put it in a vice and put the grips over the end cap and tap off(very slowly with pressure holding it back,as the spring is very strong)Over the magnetic tray.Please note how it all comes out but you can check the pictures for order.
The ball barring is very small so do use a magnetic tray of some sort.
Add the shim and redo back up in the same order it came apart.Use the vice to push all back in,it wills stop when full up and undo from vice slowly to see if all stays together.Once out put it back in the common rail and nip back up tight.
Put back engine cover and prime the fuel pump (left to the common rail under the fuel filter.
Go and start your engine and go for a run, all ok ,then all done.
Doing this raises the fuel pressure parameters allowing more fuel which in turn means more power at a higher setting.You motor will still hit limp mode if there is a massive pressure surge, but this is good as there will be not damage to your very expensive engine.
Doing this does stop the common rail plug and play boxs from going in to limp mode and get a very good gain as some box claim they can.