Hello and welcome to justanswer.com
Which engine is in your truck? Any warning indicators on? When the engine stalls will it start right back up?
We are seeing problems with the electronic throttle and the PCM programming on those trucks. The problem is due to engine deposits in the throttle leading to air[low less than desired. The remedy is to reprogram the PCM then check the throttle values and if not within spec the throttle needs to be replaced.