This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

At91 SPI Driver is broken... Or has at least changed the way it works...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]