STP

HI
New here so please have some patients
Installed three mikrotik crs 325-24g with ocs 6.4 in a ring network, as soon as i enable STP OR RSTP the Router stops working and shuts down as soon as a loop is detected,
What can i do to still stop the loop, but need the router to keep on working,