MCF5485 DSPI in 8bit transfer size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCF5485 DSPI in 8bit transfer size

Jump to solution
1,139 Views
Poloni
Contributor II

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

Labels (1)
0 Kudos
1 Solution
372 Views
Poloni
Contributor II

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

View solution in original post

0 Kudos
2 Replies
372 Views
Poloni
Contributor II

I'm attaching the screenshot of the scope. In this case I changed the SPI_MODE (is not SPI_MODE_3).

 

 

Thanks!

Poloni

0 Kudos
373 Views
Poloni
Contributor II

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

0 Kudos