what is the max speed can SPI reach for BF548 EZkit platform??
It's determined by SCK Frequency = (Peripheral clock frequency SCLK)/(2 x SPI_BAUD). max one-fourth the system clock. In a real application it's usually limited by the peripheral devices off the blackfin chip.
As i said before i am using the BF548 EZ, with the uClinux2010R1, i have a problem with SPI speed, when I set it to more than 13.1MHz it generate random data (noise),
my processor SCK is 131.25MHz, it seems like the SPI_BAUD cannot reach value under 5??
have you any idea about this?
guess you need to double check how the "random data" comes out, in the arch/blackfin/mach-bf548/boards/ezkit.c you will see we are using max_speed_hz = 25000000 for SPI Flash, and it's working fine.
i configure the SPI driver to work as a slave so in the control register i disable the BIT_CTL_MASTER
and i enable BIT_CTL_EMISO:
chip1->ctl_reg &= (~BIT_CTL_MASTER);
chip1->ctl_reg |= BIT_CTL_EMISO;
with this configuration, the slave can read from master correctly, but the master read a garbage from slave,
in very low spped 20khz the master can read correctly but with 2MHZ it read it garbage.
any help please, is there other bit in the control register to be set ?
Could you start a new thread for your question as it's a new one regarding blackfin as SPI slave?
"read a garbage from slave" means only the first one is garbage or always garbage?
For fail in high baudrate you may check if the irq is handled in time, if not, data get losses. after all it's a processor simulated slave device.
this is link to the new thread: http://ez.analog.com/thread/13480
Retrieving data ...