I'm not sure if there's any relation but I recall seeing a vaguely similar issue at some point while reading the forum and ended up at
this link, which discusses a conflict issue with the Y-endstop and SD operation, which then outlines a solution, although for printrboard, not the ramps.
In any case, maybe (or not) it relates. if not, sorry for the thread spam. Good luck.