This is a how to video on how to remove and clean the Mas Airflow Sensor and The Throttle Body which usually cause a rough idle and makes your truck die out on you.
This is not a guaranteed fix but it is a first step diagnosis in resolving your issue.
Over time, carbon buildup can accumulate around the throttle plate, changing it’s “home” position. If the buildup occurs gradually, the PCM “learns” the new home position. But when your battery goes dead or you disconnect it to work on your vehicle, the PCM “forgets” the adapative home position. If you replace the throttle body, the PCM won’t know and will continue to use the adaptive settings as if the carbon buildup is still in place. If you don’t do a relearn procedure, the PCM will “hunt” for a new baseline idle. It will eventually learn it on its own, but it may take over a week of driving, during which time you will experience high and low idle speeds and possibly rough idle.
Here’s the throttle body relearn procedure
1) Start the engine and let it idle in park for 3 minutes. During that period the idle may be higher idle than normal.
2) After 3 minutes, turn the engine off and leave it off for 60- seconds.
3) Start the engine again and let it idle in park for 3 minutes one more time. During these run periods you may see a check engine light. Scan for codes and if you get throttle body related codes, clear them.
4) If the idle speed is still off, drive the vehicle at speeds above 44-mph and operate several acceleration and deceleration cycles. Then repeat step #3 one last time.
The idle should now be normal
ProjectCorona assumes no liability for property damage or injury incurred as a result of any information contained in this video. ProjectCorona recommends safe practices when working with power tools, automotive lifts, lifting tools, jack stands, electrical equipment, blunt instruments, chemicals, lubricants, or any other tools or equipment seen or implied in this video. Due to the factors beyond the control of ProjectCorona, no information contained in this video shall create any express or implied warranty or guarantee of any particular result. Any injury, damage or loss that may result from improper use of these tools, equipment, or the information contained in this video is the sole responsibility of the user and not ProjectCorona.