SPI FLASH INTERFACING

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob,

  Yesterday I was unable to send complete project today i make minimal project so please help me out.

0 Likes
11 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You opened a new thread again, please reply to your original post.

   while(!(SPIM_ReadStatus() & SPIM_STS_TX_FIFO_EMPTY));

   SPIM_WriteTxData(transmitdata);

   CS_Write(1u); // This will remove CS before transmission is complete

Better use

   SPIM_WriteTxData(transmitdata);

   while(!(SPIM_ReadStatus() & SPIM_STS_TX_FIFO_EMPTY));

   SPIM_WriteTxData(transmitdata);    CS_Write(1u); // Transmission complete, remove CS

Bob

0 Likes
Anonymous
Not applicable

Thanks But i use    SPIM_WriteTxData(transmitdata); in read and write so i have to replace all ??

0 Likes
Anonymous
Not applicable

I change it but still nothing is happened not showing  an array

0 Likes

Post your corrected project.

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob,

Here is my Corrected Project so please check it out

0 Likes

My fault, something got scewed up in this editor.

Your code (excerpt):

SPIM_WriteTxData(transmitdata); // Write a command byte

   while(!(SPIM_ReadStatus() & SPIM_STS_SPI_DONE)); // Wait until data transmitted *** Try using the DONE flag

   SPIM_WriteTxData(transmitdata);    // *** This is a superfluid write. Deloete that

CS_Write(1u); // Transmission complete, remove CS. *** Look into eeprom datasheet for CS remaining low or not for complete transaction

CyDelay(5);

CS_Write(0u); // Taking CS low for next write

transmitdata=data;

SPIM_WriteTxData(transmitdata);// Write data byte

   while(!(SPIM_ReadStatus() & SPIM_STS_SPI_DONE)); // Wait until data transmitted

SPIM_WriteTxData(transmitdata);  // UNUSED EXTRA WRITE

setAddress(address); // Setting the address after sending command and data. Is this correct?

CS_Write(1u); // Transmission is still in progress. Wait for transmission done!

Change the other parts of your program accordingly.

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Still it is not working check it sir i change it according to you

0 Likes

What is the part number of the eeprom you use? Link to datasheet, please.

What hardware do you use, self-made? Cypress Kit?? Which one (Part number)

Bob

0 Likes
lock attach
Attachments are accessible only for community members.

Try this concept...

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob,

  As per instruction i run partially spi flash but still i am not getting proper array.

0 Likes
Anonymous
Not applicable

HIII, Shall i get code for SCB mode SPI

0 Likes