Re: spi interface
Hi brunokasimin,
As with every SPI interface, first you need to check whether Master is generating the clock pulses according to your defined frequency. Use an oscilloscope to check all the waveforms (CLK, MOSI and CS). The chip select should be active while doing the communication.
Go through the slave datasheet and find out if there are any specific sequence for its initialization. Check whether there are any general purpose registers. Then send a command (or the sequence described by slave datasheet) on SPI lines and monitor the MISO pin on Master. If everything is OK, you should be receiving the response from the slave.
You can read the value in the SPI register to verify whether you are getting correct response from the slave.
Regards,
vhn