Gentlemen,

 

Have someone managed to get SPI on DaVinci working? I have a driver which
provides open/read/write/ioctl/close interface but I need help because it
has very strange bug. I can't understand its reason.

 

I am doing block write by:

- setting up correct chip select

- settings up CSHOLD on duration of whole transaction (whole buffer write)

- setting up correct format

- perform byte-by-byte write

- clear CS

- clear CSHOLD

 

Sometimes (!) byte-by-byte write subroutine fails. 

It looks like:

 

SPIDAT1 = (config << 16 ) | data;

do

{

            Result = SPIBUF;

} while(result & (1 << 29)) // check TXFULL bit

 

The failure is due infinite loop. Above mentioned loop never ends. It seems
that hardware can't transmit data!

 

Example values of my registers are (when I terminate this loop after several
seconds of waiting):

SPIDAT1 = 0x10020055 (I am writing 0x55)

SPIBUF  =  0xA0000000

 

But If I put debugging output everywhere (printk .) it helps.

 

What is the problem?

 

Thanks.

Kirill

 

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to