This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
At91 SPI Driver is broken... Or has at least changed the way it works...
- From: "oliver munz @ s p e a g" <munz at speag dot ch>
- To: "ecos-devel at sourceware dot org" <ecos-devel at sourceware dot org>
- Date: Tue, 19 May 2009 15:11:24 +0200
- Subject: At91 SPI Driver is broken... Or has at least changed the way it works...
- Reply-to: munz at speag dot ch
I usesd the AT91-SPI driver last year for accessing two devices which
are using 24-bit data-words. My working code looked like this:
...
cyg_spi_transaction_begin(spi_device);
HAL_WRITE_UINT32(AT91_PIO + AT91_PIO_SODR, PA_SSPLL |
PA_SSDDS | PA_SSIQ0 | PA_SSIQ1);
HAL_WRITE_UINT32(AT91_PIO + AT91_PIO_CODR, device & (PA_SSPLL |
PA_SSDDS | PA_SSIQ0 | PA_SSIQ1));
cyg_spi_transaction_transfer(spi_device, false, send_size, send,
NULL, false);
HAL_WRITE_UINT32(AT91_PIO + AT91_PIO_SODR, PA_SSPLL |
PA_SSDDS | PA_SSIQ0 | PA_SSIQ1);
cyg_spi_transaction_end(spi_device);
...
Now i have a newer version of eCOS and this code dosnt beave good
anymore. The problem is, that the CS goes between every byte, thus my
devices get not 24-bit-words but 3 times a 8-bit-word. So my SW doesent
work anymore, and i need to know. if i have to fix the driver and make a
patch, or if the driver is ok, and i have to change the way i use the
SPI-infrastructur...
Thanks for answers
Oliver Munz