SSP0 on 1768 to interface a SPI serial Flash

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

SSP0 on 1768 to interface a SPI serial Flash

1,585 Views
giusloq
Contributor III

I'm using SSP0 in 1768 to interface a serial SPI Flash memory. Pin SSEL0 is driven as a normal GPIO.

It works with lower clock frequencies (32MHz), but it doesn't work with higher frequencies (48MHz).

It seems I read data from the serial Flash shifted off by one bit when the frequency is high. I expect 0x4C51 (0100 1100 0101 0001), but I obtain 0xA6A8 (1010 0110 1010 1000).

I'm using serial Flash SST26VF064B from Microchip. I'm usign HIGH-SPEED READ command (0x0B) that should be possible to use at 48MHz.

0 Kudos
Reply
3 Replies

1,226 Views
giusloq
Contributor III

Even if there's a FAQ here that says:

The maximum frequency of the SPI/SSP pins is 50MHz. Higher frequencies will affect the signal integrity of output.

This is in contrast with the datasheet that says 33Mbit/s.

0 Kudos
Reply

1,226 Views
giusloq
Contributor III

I think the problem is in the maximum frequency compatible with SSP peripheral in LPC1768.

In the Product Datasheet of LPC1768 (here), in chapter 12.7 "SSP interface", I see the following sentence:

The maximum SSP speed is 33 Mbit/s in master mode

It seems it is the maximum bitclock frequency of SCK signal. This explains why my code works at 24MHz, but not at 48MHz.

The SSP bitclock is CCLK/PCLK_SSP0 /(SCR+1)/CPSDVSR, where:

  • CCLK is the CPU clock (in my case 96MHz)
  • PCLK_SSP0 is the peripheral clock divider (1, 2, 4, 8)
  • SCR is 0..255
  • CPSDVSR is 2, 4, ... 254

Is there a maximum value for the SSP peripheral clock (i.e., CCLK/PCLK_SSP0)?

To obtain 24MHz bitclock I need to divide CCLK=96MHz by 4. Two possibilities are possible:

  • PCLK_SSP0=2; SCR=0; CPSDVSR=2 (SSP clocked at 48MHz)
  • PCLK_SSP0=1; SCR=1; CPSDVSR=2 (SSP clocked at 96MHz)

Another question. I could use SPI peripheral instead of SSP0. It seems a completely different peripheral that is always compatible with SPI bus. What is the maximum frequency clock for SPI peripheral? Are there any differences between SPI and SSP0 regarding maximum clock frequencies?

0 Kudos
Reply

1,226 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Giuseppe Modugno

Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.

Before answer the question, I was wondering if you can share the demo code and a screenshot which illustrates the wave of the communication between the SST26VF064B and LPC1768.

I'm looking forward to your reply.

Have a great day,
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
0 Kudos
Reply