-
1. Re: SPI FLASH INTERFACING
bob.marlowe Dec 11, 2017 12:02 AM (in response to bingavale_2802216)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
-
2. Re: SPI FLASH INTERFACING
bingavale_2802216 Dec 11, 2017 12:12 AM (in response to bob.marlowe)Thanks But i use SPIM_WriteTxData(transmitdata); in read and write so i have to replace all ??
-
3. Re: SPI FLASH INTERFACING
bingavale_2802216 Dec 11, 2017 12:18 AM (in response to bingavale_2802216)I change it but still nothing is happened not showing an array
-
4. Re: SPI FLASH INTERFACING
bob.marlowe Dec 11, 2017 1:30 AM (in response to bingavale_2802216)Post your corrected project.
Bob
-
5. Re: SPI FLASH INTERFACING
bingavale_2802216 Dec 11, 2017 3:14 AM (in response to bob.marlowe)Hi Bob,
Here is my Corrected Project so please check it out
-
MX25R4035F.cywrk.Archive01.zip 821.8 K
-
-
6. Re: SPI FLASH INTERFACING
bob.marlowe Dec 11, 2017 3:42 AM (in response to bingavale_2802216)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
-
7. Re: SPI FLASH INTERFACING
bingavale_2802216 Dec 11, 2017 4:14 AM (in response to bob.marlowe)Still it is not working check it sir i change it according to you
-
MX25R4035F.cywrk.Archive02.zip 821.9 K
-
-
8. Re: SPI FLASH INTERFACING
bob.marlowe Dec 11, 2017 5:03 AM (in response to bingavale_2802216)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
-
9. Re: SPI FLASH INTERFACING
bob.marlowe Dec 11, 2017 10:05 AM (in response to bob.marlowe)Try this concept...
Bob
-
10. Re: SPI FLASH INTERFACING
bingavale_2802216 Dec 12, 2017 1:40 AM (in response to bob.marlowe)Hi Bob,
As per instruction i run partially spi flash but still i am not getting proper array.
-
MX25R4035F.cywrk.Archive03.zip 821.5 K
-
-
11. Re: SPI FLASH INTERFACING
bingavale_2802216 Dec 13, 2017 2:49 AM (in response to bingavale_2802216)HIII, Shall i get code for SCB mode SPI