This is the mail archive of the ecos-discuss@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 and SPI modes


Hello,

I noticed in spi_at91.c line 540 that the SPI clock phase is apparently
set incorrectly. The bit in the SPI_CSR0 register is called NCPHA and is
inverted from what you would expect. The "N" indicates negative logic, I
think. The datasheet for at91sam9g20 bears this out.

The result is that when using the CYG_SPI_DEVICE_ON_BUS(n) macro,
the .cl_pol and .cl_pha members do not select the correct SPI mode. I
noticed this when using SPI flash on one of our boards.

Have other developers using AT91 devices noticed this? Maybe people just
tried various combination of clock polarity and phase until things
worked?

Thanks!

-- 
+------------------------------------
| Daniel Helgason <dhelgason@shaw.ca>



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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