LPC SPI

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC SPI

1,602 次查看
sveer9211
Contributor I

Dear Sir,

 I am currently working on the  LPC1549 SPI protocol . i want to interface  a SPI flash to the  LPC1549 

i am able to read the Manufacture ID and  JEDEC ID but reading and writing of bytes or pages in not possible .

kindly give me some direction to proceed 

标签 (1)
0 项奖励
回复
3 回复数

1,257 次查看
sveer9211
Contributor I

thanks all for the reply i got SPI in working condition  again thanks to all who responce in mean time .

0 项奖励
回复

1,257 次查看
ianbenton
Senior Contributor I

The usual trap for the unwary is the "write enable" command. This has to be sent before EVERY write instruction.

CS low - send 0x06 - CS high.

Then send the write command:

CS low  - send 0x02, send the address, send the data - CS high.

Also, there is generally a limit on how much data you can send it one go.

And on SOME devices, pin 3 (Write protect) has a pull up, so you can leave it floating, and on OTHER devices it doesn't, so it won't write unless it is connected to V+.

Read isn't usually a problem, it will read 0xFF if it is new.

0 项奖励
回复

1,257 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Lakhbir Singh,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I'd highly recommend you to visualize the SPI wave via the oscilloscope or logic analyzer when writing or reading SPI flash, then comparing with the standard process which is illustrated in SPI flash's datasheet, it will help you to figure the root cause out.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复