MSP430 interfacing with External SPI eeprom M95-m02 (ST micro)

Status
Not open for further replies.

Nikunj Tanna

Advanced Member level 4
Joined
Dec 8, 2009
Messages
115
Helped
23
Reputation
46
Reaction score
15
Trophy points
1,298
Location
Ahmedabad, Gujarat, India
Visit site
Activity points
1,985
Hi all,

I am trying to interface my MSP430F5419A with M95-M02 (SPI based external EEPROM from ST micro). I don't have much experience in SPI. I have just followed few links on the web and trying to read and write the data. But I want to know the flow of code for this SPI IC first. I have pointed out the flow. Can you please tell me is it true ?

1) Initiliaze SPI first.
2) To Send dummy data in spi tx buff and recieve the same in rx buff
3) Then Write data to memory (16 bit addr 8 bit data 0xa0). Each and every byte is echoed in rx buff
4) Then Read memory by sending dummy data 0x00.

Nikunj
 

Hello!

1. Yes, you have to initialise SPI first. Look at MSP430 sample code, it's just a matter of a few lines, say 5, 6.

2. Why do you want to send dummy data first? Usually you send some command to the flash memory and then
receive something.

3. Whether the byte is echoed depends on the device you are talking to.

4. If you want to read or write, you should send commands first to tell the chip what you want to do.

A good way to start would be reading the data sheet
https://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00290531.pdf
especially read and write timings.

Dora.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…