Could figureout if the problem is related with the SPI or the SD library, but using the example sketch "listfiles" if a pinMode(53, OUTPUT); comand is on the code next time I try to upload any sketch I get this error:

No device found on COMx

I have to take the power from DUO out and in again so the upload works ok and all came back to normal.

If I have pinMode(52, OUTPUT); insted, them anything related to SD fails, so this example sketch gives me:

Hi, I think I did not explain it correctly, the problem is not the SS pin for using the SD or any SPI comunication.

What I want to say is if apart your normal working code for SPI/SD by some extra need on your sketch you use those pins (53 or 52) on a pinMode comand those problems show up.

Just do the test or anyone else to understand better, open the "listfiles" example from SD library, them see it working, upload it again and still working ok? Them put on void setup this pinMode(53, OUTPUT); and upload again, stiill working right? Now reupload again the same code and you will get a "No device found on COMx" erro and couldn't upload any further sketch without power out the DUO first, thats it.

listfiles:26: error: variable or field 'printDirectory' declared voidlistfiles:26: error: 'File' was not declared in this scopelistfiles:26: error: expected primary-expression before 'int'listfiles:23: error: 'File' does not name a typelistfiles.ino: In function 'void setup()':listfiles:41: error: 'SD' was not declared in this scopelistfiles:47: error: 'root' was not declared in this scopelistfiles:47: error: 'SD' was not declared in this scopelistfiles:49: error: 'printDirectory' was not declared in this scopelistfiles.ino: At global scope:listfiles:59: error: variable or field 'printDirectory' declared voidlistfiles:59: error: 'File' was not declared in this scopelistfiles:59: error: expected primary-expression before 'int'