This is the mail archive of the
mailing list for the eCos project.
Re: using SPI-support of eCOS for the AT91SAM7X
- From: Robert Brusa <bob dot brusa at gmail dot com>
- To: "Andrew Lunn" <andrew at lunn dot ch>
- Cc: MailingList:ecos-discuss <ecos-discuss at ecos dot sourceware dot org>;
- Date: Wed, 10 Sep 2008 16:33:23 +0200
- Subject: Re: [ECOS] using SPI-support of eCOS for the AT91SAM7X
- References: <op.ugz4wmrukeg3uf@localhost> <20080905094112.GM27459@lunn.ch>
- Reply-to: Bob dot Brusa at gmail dot com
On Fri, 05 Sep 2008 11:41:12 +0200, Andrew Lunn <email@example.com> wrote:
On Fri, Sep 05, 2008 at 11:35:00AM +0200, Robert Brusa wrote:
My board has a DS3234 serial Real Time Clock connected to its sip0-bus.
From the documentation (ecos-ref-a4.pdf) I concluded that using
cyg_spi_transer would cover all my requirements. But there is a problem:
The first argument of this function is a pointer to a type
cyg_spi_device. I could find nowhere an explanation on how to set up (or
get acces to) such a structure. Who could provide a few lines of code to
show how it is done? Thanks
Does you target board have SPI support?
Take a look at the end of devs/spi/arm/eb55/current/src/spi_eb55.c
This defines an SPI device for the Atmel AT45DB321B DataFlash
connected to the SPI bus on an EB55 development board. You need
something similar for your DS3234.
It helped. The bus is now working as intended - as I can see using the
logic analyser. The data read from the RTC are still rubbish, but agree
perfectly with what I see with the LA. It seems my protoboard has some
hardware problem. But this is another story.... Thank you for your help.
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss