Hi jpeyron,
Thank you for your answer. So I added this code and also in function bool MtdsHalSpiReady() I copy paste the code for AVR and change the defined with SAM3X8E. Same in function uint8_t MtdsHalPutSpiByte(uint8_t bSnd) .
Now it goes in else if (SAM3X8E), however nothing is declared in the scope. I got this type of error:
C:\Program Files (x86)\Arduino\libraries\mtds\MtdsHal.cpp: In function 'void MtdsHalInitSpi(uint32_t, uint32_t)':
C:\Program Files (x86)\Arduino\libraries\mtds\MtdsHal.cpp:339:2: error: 'SPCR' was not declared in this scope
SPCR = _BV(SPE) | _BV