PSOC 4 to NOR Flash interface

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

cross mob
Anonymous
Not applicable

Hello everyone,

I am working on a small project that requires an SPI interface between a PSOC4 and a NOR Flash (N25q128 or MT25QL128).  After going over the datasheets both for the NOR Flash and SCB module, I noticed the following:

1) The NOR Flash uses rising edge to clock-in the data and falling edge to clock out the data.

2) The clock polarity settings for SCB module apply both for MISO and MOSI lines.  I was not able to find how to specify clock polarity separately for MISO and MOSI

Are there any pre-defined modules in the PSOC Creator to handle this or I have to come create my own with shift registers etc?  Just wanted to check if anyone had a similar experience before I spend time re-inventing the wheel.  Any help would be appreciated.

Thanks,

Yevgeniy

0 Likes
1 Solution
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Yevgeniy,

I went through the datasheet of N25q128. It says that either of below 2 Motorola SPI modes can support its operating.

CPOL=0, CPHA=0,

CPOL=1, CPHA=1

It doesn't require to specify clock polarity separately for MISO and MOSI.

And Micron should provide Low Level Drivers for their Nor.  The LLD could be migrated easily onto different platform.

Thanks,

Ryan

View solution in original post

0 Likes
2 Replies
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Yevgeniy,

I went through the datasheet of N25q128. It says that either of below 2 Motorola SPI modes can support its operating.

CPOL=0, CPHA=0,

CPOL=1, CPHA=1

It doesn't require to specify clock polarity separately for MISO and MOSI.

And Micron should provide Low Level Drivers for their Nor.  The LLD could be migrated easily onto different platform.

Thanks,

Ryan

0 Likes
Anonymous
Not applicable

Hello Ryan,

Thank you for the reply!  Somehow I overlooked that section in the datasheet ("Serial Peripheral Interface Modes").  Let me try putting some hardware together to test it and I will get back with the results.

Thanks,

Yevgeniy

UPDATE:

I was able to read chip ID from a MT25QL128 part, so I would consider the able mentioned solution as a valid one.  Thanks again Ryan.

0 Likes