开发者

MSP430 SPI to M25P64

I have a SPI for MSP430 written. If I send WRSR(01h) or RDSR(05h) to M25P64 flash.

The response I get from the Flash SPI_MISO is FFh.

So my question is "Is the response I have obtained is it right?" How do I come to an understanding that handshaking between my SPI and Flash is correct?

Tha开发者_C百科nks

AK


Is the response I have obtained is it right?

The response is wrong. 30 seconds on Google and in the datasheet will tell you that. Things to check (since you have not provided any information):

How do I come to an understanding that handshaking between my SPI and Flash is correct?

  • Is this a new piece of SPI code? If so have you checked with an oscilloscope to see what you send out (clock and MOSI) is what you expect and matches what the datasheet says the device expects? It's the definitive way to be sure.
  • Does your SPI code work with any other devices?
  • Are your IO pins configured correctly on the MSP430?
  • Have you got the SPI module configured correctly for phase and polarity?
  • Did you forget to assert the chip select line?
  • What about HOLD?
  • Did you remember to send a dummy byte after the RDSR command so that the device would send the status register value?
  • Do you see a response from the device on an oscilloscope? Does the MSP430 read that value or a different one?

You are sometimes better first of all trying to read the device ID rather than the status register for a new piece of code. The reason for that is the device ID will never change, whereas the status register might change (although that depends on the device).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜