the error message actually tells you what's wrong. The SPI speed is too fast - have you tried to reduce it from 40 MHz to say 20 MHz? Works for me.
Thanks a lot man!!! Because of your help, I was able to complete my work. Great thanks to you.