M0 pro: SPI communication, code works on Uno, but not in M0. Using ICSP port
Which version of the Arduino IDE are you using ? If its an older one, try to get the latest one, sometimes that solves issues like the one you have.