EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

SPI Flash: don't work high-speed read at 48MHz

Started by pozz March 7, 2018
I'm using Microchip SST26VF064B SPI Flash memory with an LPC1768 from LPC.

It works until I change the SPI clock frequency from 24MHz to 48MHz.

I'm using HIGH-SPEED READ command that should work up to 104MHz (the 
power supply is 3.3V).

For example I read 0x28 0x26 when they should be 0x51 0x4C.

0010 1000 0010 0110    -> 0x28 0x26
0101 0001 0100 1100    -> 0x51 0x4C

They appears shifted by one bit... except the MSBit of the second byte.

What do you think?
On 07/03/18 16:51, pozz wrote:
> I'm using Microchip SST26VF064B SPI Flash memory with an LPC1768 from LPC. > > It works until I change the SPI clock frequency from 24MHz to 48MHz. > > I'm using HIGH-SPEED READ command that should work up to 104MHz (the > power supply is 3.3V). > > For example I read 0x28 0x26 when they should be 0x51 0x4C. > > 0010 1000 0010 0110��� -> 0x28 0x26 > 0101 0001 0100 1100��� -> 0x51 0x4C > > They appears shifted by one bit... except the MSBit of the second byte. > > What do you think?
I'd check the polarity of the clock and the edges used. There are four possible combinations here, and it is not uncommon for one of the wrong choices to work at slower speed but fail at higher speed. Sometimes these things are wrong no matter how carefully you follow the documentation - it seems to follow the 50%/90% rule (if you have 50% chance of guessing correctly, you have 90% chance of guessing incorrectly).
On 03/07/2018 10:51 AM, pozz wrote:
> I'm using Microchip SST26VF064B SPI Flash memory with an LPC1768 from LPC. > > It works until I change the SPI clock frequency from 24MHz to 48MHz. > > I'm using HIGH-SPEED READ command that should work up to 104MHz (the > power supply is 3.3V). > > For example I read 0x28 0x26 when they should be 0x51 0x4C. > > 0010 1000 0010 0110��� -> 0x28 0x26 > 0101 0001 0100 1100��� -> 0x51 0x4C > > They appears shifted by one bit... except the MSBit of the second byte. > > What do you think?
Sure you're reading on the right clock edge? Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com
Il 07/03/2018 16:51, pozz ha scritto:
> I'm using Microchip SST26VF064B SPI Flash memory with an LPC1768 from LPC. > > It works until I change the SPI clock frequency from 24MHz to 48MHz. > > I'm using HIGH-SPEED READ command that should work up to 104MHz (the > power supply is 3.3V). > > For example I read 0x28 0x26 when they should be 0x51 0x4C. > > 0010 1000 0010 0110��� -> 0x28 0x26 > 0101 0001 0100 1100��� -> 0x51 0x4C > > They appears shifted by one bit... except the MSBit of the second byte. > > What do you think?
It seems SSP peripheral of LPC1768 MCUs (the peripheral I'm using) has an upper limit of 33MBit/s. I see this limit in the datasheet.
On 03/08/2018 03:10 AM, pozz wrote:
> Il 07/03/2018 16:51, pozz ha scritto: >> I'm using Microchip SST26VF064B SPI Flash memory with an LPC1768 from >> LPC. >> >> It works until I change the SPI clock frequency from 24MHz to 48MHz. >> >> I'm using HIGH-SPEED READ command that should work up to 104MHz (the >> power supply is 3.3V). >> >> For example I read 0x28 0x26 when they should be 0x51 0x4C. >> >> 0010 1000 0010 0110��� -> 0x28 0x26 >> 0101 0001 0100 1100��� -> 0x51 0x4C >> >> They appears shifted by one bit... except the MSBit of the second byte. >> >> What do you think? > > It seems SSP peripheral of LPC1768 MCUs (the peripheral I'm using) has > an upper limit of 33MBit/s. I see this limit in the datasheet. >
So switch to the wrong clock edge. ;) Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com

The 2024 Embedded Online Conference