@Ajith-Pinninti said in G28 W Error: Failed to enable endstops:

M574 W1 S1 P"!e2stop"

Try duex.e2stop as the pin name.