Hi , i have tried to write some code for M25P80 SPI communication using c programing. i have defined GPIO pins and chip select pin SPI functions also. But i want to make sure what are the functions should i add? Can anybody help me to complete the code for M25P80? or if anybody has written already some code then please email me at pra20008dip@homtail.com thank you.
Hey, I have posted my code...could you please help me what else should i need to implement more..?
You enable a timer interrupt, but there is no service routine.
Your delay function may be optimized away. Figure out what purpose it has, ideally use a timer or systick based counter to mark actual time, rather than loop iterations.
Your main() loop sends non-sense to the Serial NOR Flash device.
Have you reviewed the manual/data-sheet for the M25P80?
If you send an READ ID Command, does it return the data you expect, along with the unique id?
You'd want to implement a command function. Use that to send READ STATUS REGISTER, READ DATA BYTES, SECTOR ERASE, WRITE ENABLE, WRITE DISABLE, PROGRAM PAGE, etc.
Thanks for your suggestion ... I did completed the program...it works nice....