My setup is MCF5485 (EVB) + LTIB 20080808 (kernel 2.6.25).
I'm having a problem with SPI in 8-bit mode. I noticed that the last pulse clock pulse is missing. In 16-bit transfer size, the SPI is working fine. In all tests my SPI is configured to SPI_MODE_3.
Anyone had this problem?
Thanks!
Poloni
Solved! Go to Solution.
Hi developers!
I found the solution of this problem. I just adjusted the timing of the transaction. Especially PDT (delay after transfer prescaler) and DT (delay transfer scaler).
I dumped the registers and I found that all scalers were at minimum. As I'm using 100kHz, I believe that the transactions were overlapping. So I changed this fields and communication is OK!
My config is:
PASC = 3
PDT = 3
CSSCK = 8
ASC = 8
DT = 3
These values can be optimized, but this is only a test.
Be careful with m547x_8x-devices.c. In this file there is a bug! Notice that this module uses mcfqspi.h, but the device driver mcf_dspi.c (mcf_dspi.ko) uses the struct coldfire_dspi_chip. Be careful! The solution is to change the include mcfqspi.h to mcfdspi.h and change the struct coldfire_spi_chip to struct coldfire_dspi_chip.
Poloni
I'm attaching the screenshot of the scope. In this case I changed the SPI_MODE (is not SPI_MODE_3).
Thanks!
Poloni
Hi developers!
I found the solution of this problem. I just adjusted the timing of the transaction. Especially PDT (delay after transfer prescaler) and DT (delay transfer scaler).
I dumped the registers and I found that all scalers were at minimum. As I'm using 100kHz, I believe that the transactions were overlapping. So I changed this fields and communication is OK!
My config is:
PASC = 3
PDT = 3
CSSCK = 8
ASC = 8
DT = 3
These values can be optimized, but this is only a test.
Be careful with m547x_8x-devices.c. In this file there is a bug! Notice that this module uses mcfqspi.h, but the device driver mcf_dspi.c (mcf_dspi.ko) uses the struct coldfire_dspi_chip. Be careful! The solution is to change the include mcfqspi.h to mcfdspi.h and change the struct coldfire_spi_chip to struct coldfire_dspi_chip.
Poloni