I have interfaced SST26VF064B Flash Memory with SPI1/SSP of LPC2138 ARM microcontroller.
Issue- I am facing an issue to choose Serial clock Rate selection to operate SPI1.
After APB divider I am using 15 MHz for peripheral. Plz suggest if i need to use 60MHz
Configuration- I have interfaced SPI1/SSP MOSI (Pin54), MISO (Pin53), SSEL (Pin55), SCK (pin47) lines with memory pins through 10k Pullup resistor. this is single master and single Slave . I want to make transmission in master mode and SPI mode And initialized SPI1 the below:-
I have defined SSEL as #defined SS 00100000 // p0.20
Initialization-
SSPCPSR=0x02; // 2 for master mode
// 8 bit data of tx/rx, SCR (Serial clock rate as 10 =0A(hex) ) PCLK/(CPSDVSR*[SCR+1])
SSPCR0= 0x0A07;
SSPCR1=0x02; //normal mode selection, SSp controller enabled
I do not understand that how to select SCR (serial clock rate) in SSPCR0 register??? So I can make write and read properly.
I have used formula- PCLK/(CPSDVSR*[SCR+1]) // 15/( 2[2+1]) = 2.5MHZ
I am receiving 0xFF after reading. I think this receive is dummy byte and writing is not happening.
Hope somebody can give suggestion to SCR and SSPCPSR register value selection
Regards,
Rituv