Gen 4 LS Swaps and the E38 ECU: What You Need to Know Before You Tune
Gen 4 LS engines have become one of the most popular swaps around. Junkyards are full of 5.3s, 6.0s, and 6.2s from 2007-and-up GM trucks and SUVs, and they make great power for the money. But a Gen 4 swap isn’t just a Gen 3 swap with a newer engine. The computer, sensors, and factory features are different, and the tune has to account for all of it.
Here’s what you need to know about swapping a Gen 4 LS with an E38 ECU.
What Is the E38?
The E38 is the engine computer GM used on many Gen 4 LS engines, including a lot of 2007-and-up truck and SUV engines. Some Gen 4 engines came with other ECUs, so check what came on yours. Right now, our mail-in Gen 4 base tunes cover the E38.
Unlike Gen 3, where you choose between the drive-by-cable P01 and the drive-by-wire P59, the E38 is drive-by-wire only. You’ll need a compatible electronic throttle body and gas pedal.
Gen 3 vs. Gen 4: Why the ECU Has to Match
The biggest difference is the crank and cam signal.
- Gen 3 engines use a 24-tooth crank reluctor wheel with the cam sensor at the back of the block.
- Gen 4 engines use a 58-tooth crank reluctor wheel with the cam sensor in the front timing cover.
A Gen 3 P01 or P59 can’t read a Gen 4 58X crank signal without a conversion box, and an E38 is made for the Gen 4 signal. The easiest and cleanest route for most Gen 4 swaps is to run the ECU designed for that engine.
Gen 4 Features That Need to Be Set Up in the Tune
Gen 4 engines came with factory features that Gen 3 engines didn’t have. In a swap, these often need to be turned off or set up differently.
Active Fuel Management (AFM/DoD): Many Gen 4 truck engines have AFM, which shuts down cylinders to save fuel. A lot of swappers remove it with a lifter and cam swap. If AFM has been removed mechanically, it must also be turned off in the tune. Even if it’s still in the engine, many people choose to turn it off for a swap.
Variable Valve Timing (VVT): Some Gen 4 engines have VVT. If you’ve installed a non-VVT cam or a VVT delete kit, the tune has to be set up for it, or you’ll get codes and poor running.
Cam swaps: Gen 4 engines respond great to a cam, but a bigger cam changes idle vacuum and airflow. Just like Gen 3, a cammed Gen 4 needs injector data, idle airflow, and startup fueling set up for the combination.
Other Things to Plan For
- Transmission: Transmission: The E38 doesn’t control a 4L60E or 4L80E by itself, so those swaps need a separate transmission controller (TCM). TCM programming for 4L60E and 4L80E is included with our E38 base tunes. Manual transmissions are supported too. Running something else? Contact us and we’ll let you know what’s needed.
- Electric fans: Like any swap, fan control needs to be set up for your wiring and the temperatures you want.
- Speedometer: Your gear ratio and tire size need to be entered so your speedometer and vehicle speed are right. (Need help finding those? See 5 Numbers You Need Before Ordering an LS Swap Tune.)
- VATS / anti-theft: Like Gen 3 computers, the E38 has to have the factory anti-theft turned off so the engine will start and stay running.
What’s Included in an E38 Base Tune
An E38 base tune sets up your Gen 4 ECU for your swap so the engine starts, idles, and drives.
Gen 4 Stock / Near-Stock Base Tune includes VATS/theft deterrent removal, engine displacement setup, drive-by-wire throttle setup, manual, 4L60E, or 4L80E configuration, TCM programming for 4L60E/4L80E (included), electric fan controls, MAP and MAF sensor setup, tire size and gear ratio correction, basic startup calibration, and swap-related diagnostic setup.
Gen 4 Cammed / Modified Base Tune includes everything in the stock package, plus injector data setup, idle airflow adjustments, idle speed and spark setup, and additional drivability starting adjustments.
Like any base tune, it’s a starting point built from your specs, not a final wideband-tuned or dyno-tuned calibration. Bigger builds may need a custom tune after. (See LS Swap Base Tune vs. Custom Tune.)
Like any base tune, it’s a starting point built from your specs, not a final wideband-tuned or dyno-tuned calibration. Bigger builds may need a custom tune after. (See LS Swap Base Tune vs. Custom Tune.)
Get Your Gen 4 Swap Running

E38 tunes include TCM programming for 4L60E/4L80E swaps. Plus $10 return shipping. Typical turnaround is 1–2 business days after we receive your ECU.
Order your mail-in LS swap base tune here →
Have questions about your Gen 4 setup? Contact us or call (430) 215-4536.

E38 tunes include TCM programming for 4L60E/4L80E swaps. Plus $10 return shipping. Typical turnaround is 1–2 business days after we receive your ECU.
Order your mail-in LS swap base tune here →
Have questions about your Gen 4 setup? Contact us or call (430) 215-4536.
Follow Midgard Industries
Don't want to tune it yourself?
Mail in your P01/P59 and get a VATS-deleted, swap-ready base tune for $100. Typical turnaround is 1-2 business days after the ECU is received.