check engine light comes on when driving over 55 mph code is 0740 on 2004 Volvo C70

when the light comes on the code comes up tcm 0740 or 0700 the transmission shifts and runs fine until this happens and then it has a clunk when it hits 50 mph as it is slowing down and after stopping it goes into a safe mode, where it is sluggish to move for the first 20 mph then it seems normal. When I turn off the code it runs fine again until I drive over 55 mph for any length of time and the lights start flashing again. I changed the trans oil and flush, then changed the valve body and it is still doing it

Asked by for the 2004 Volvo C70