Hello, and welcome to the forum.
Firstly, it would seem that the setting should be SPCR = 0x2A; otherwise the SPI module is not enabled. The other register should perhaps be SPSCR = 0x00; since writing 1 to bit-2 does nothing.
I suspect that the frequency you refer to is an external crystal frequency rather than the bus frequency, since the maximum bus frequency is limited to 8MHz. In this case the bus frequency would be 2.4576MHz, and the SPI clock 1.2288MHz. I presume this is OK for the E626 die.
When the SPI module is enabled, the SS pin is an input used for slave operation. For master mode, you will need to determine the pin used for the SS output signal applied to the E626 die. This pin will need to be controlled by your code.
You do not provide the details of your communications code, but be aware that the values returned as a result of sending the command and address bytes will probably be meaningless, and to recover the "latched" bytes from the slave, you need to send one or more dummy bytes to the slave, after the SS signal has been raised. The number of dummy bytes will depend on how many bytes are returned.
The typical code for the transfer of a single byte in each direction would be -
byte SPI_trans( byte val)
{
while (!SPSCR_SPTEF);
SPDR = val; // Send byte value
while (!SPSCR_SPRF); // Wait for completion of transfer
return SPDR;
}
It would appear that the following sequence of events would then be required -
SS = 0;
(void)SPI_trans( command); // Ignore return data
(void)SPI_trans( address);
SS = 1; // Return data latched
dat = SPI_trans( 0); // Send dummy byte/return data byte
// Return further data bytes if required
Is this code something similar to what you are using?
Regards,
Mac