E5940E is a fault stored in your BMW's memory (an ISTA fault code, not a standard OBD-II P-code).
What it means: Rear electronic module: the CAN message 'drive train data 2' from the engine control unit (DME/DDE) was missing for a while. Usually sporadic — e.g. while the car is waking up/going to sleep, during engine start, low battery voltage or after work on the car. If there are no warnings, clear the code; if many 'message missing' codes keep returning, have the battery and the bus/engine control unit checked.