Arduino DUE and the code that does not work.

If you don't use the SPI dedicated pins, then you might be interested by this thread, reply #1:

https://forum.arduino.cc/index.php?topic=491672.0

Usually when an SPI communication doesn't work, this is due to a wrong CPOL/NCPHA configuration.