I use k10 to access SPI Flash(SST26VF064B). Data write and read is correct
BUT: interval time between multi-Byte transfer is too Long, so the performace of spi is very low
SPI-CLK is 24.576Mhz, one byte transfering takes 300ns. but interval time between multi-Byte transfer is 2us.
I use PE, enable spi interrupt to control transfering,
The code is blow:
unsigned int SST26_ReadID(void) // send cmd to get flash ID
unsigned char cmd; //1-Byte cmd and 3-Byte dummy characters
unsigned char data;
cmd=0x9F; //JEDEC-ID Read Command
** Event : SPI_OnBlockReceived (module Events)
** Component : SPI [SPIMaster_LDD]
** This event is called when the requested number of data is
** moved to the input buffer. This method is available only if
** the ReceiveBlock method is enabled.
** UserDataPtr - Pointer to the user or
** RTOS specific data. The pointer is passed
** as the parameter of Init method.
void SPI_OnBlockReceived(LDD_TUserData *UserDataPtr)
/* Write your code here ... */