Hi Saul,
After checking your code, I locate the detail function line which caused the hardfault.


The main problem is:
status = SPI_Op(sequence,buf,(len+ 1),0);
When SPI_Op return back, the returned data is 2, and when 2 gives to status, the hardfault happens.
The according asm code is :
00001e48: movs r3, r0
00001e4a: strb r3, [r4, #0]
So, that's really very strange, I am still working on it.
Any updated information, will let you know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------