SPIMaster_LDD usage with K60 and serial Flash chip

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPIMaster_LDD usage with K60 and serial Flash chip

1,556 Views
joevignola
Contributor III

I'm using the Processor expert SPIMaster_LDD with a K60 processor and a serial flash chip (SST25VF032B).  I have more than one flash chip on the SPI bus with separate chip selects. In order to be able to read anything from the chip I need to send out the command plus the number of bytes I expect to get back. Also, I need to ignore any bytes that are received while the command to the chip is being transmitted. I have attached sample functions (memory_read_status) to read the Status register from the FLASH chip.  Is this the correct way to use the processor expert functions?

 

Thanks,

 

Joe.

 

 

Original Attachment has been moved to: spi_memory.c.txt.zip

Labels (1)
0 Kudos
3 Replies

556 Views
micheljssimon
Contributor I

Greetings,

I was reading your code and I found it very useful for my project, I was looking for a spi nor driver and I found that it is similar to yours. Did your code work? I think it is not complete, it is missing events.c and definitions. Could you please upload the entire driver?

I would appreciate it very much.

Thanks in advance,

Francisco

0 Kudos

556 Views
joevignola
Contributor III

Francisco,

I got the driver from Freescale, but cannot where I downloaded from. There is nothing in events.c since it uses polling to get the status of the reads/writes to the SPI bus. I have attached the header file which has the remaining define statements that you require. And yes the driver works.

Joe.

0 Kudos

557 Views
vfilip
NXP Employee
NXP Employee

Hello,

I am not sure if i understand the question correctly, but from PEx perspective you should create your own component using CDE (Component Development Environment) tool. The component name could be for example SerialFlash. Your component should also inherit SPIMaster_LDD.

Best regards

Vojtech Filip

Processor Expert Support Team

0 Kudos