From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7220 invoked by alias); 28 Feb 2007 15:59:20 -0000 Received: (qmail 7205 invoked by uid 22791); 28 Feb 2007 15:59:16 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 28 Feb 2007 15:59:07 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1HMRCj-0004u7-00; Wed, 28 Feb 2007 16:58:57 +0100 Date: Wed, 28 Feb 2007 15:59:00 -0000 To: Julien St?phane Cc: ecos-discuss@ecos.sourceware.org, andrew@lunn.ch, Etique Philippe Message-ID: <20070228155857.GC14399@lunn.ch> Mail-Followup-To: Julien St?phane , ecos-discuss@ecos.sourceware.org, andrew@lunn.ch, Etique Philippe References: <20070228144319.GC24209@lunn.ch> <20070228151737.GA14399@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] RE?: RE?: [ECOS] Does AT91 SPI driver support external SPI devices? X-SW-Source: 2007-02/txt/msg00268.txt.bz2 On Wed, Feb 28, 2007 at 04:33:57PM +0100, Julien St?phane wrote: > I don't know how to put the correct value because my board > (AT91EB55) use a BIN/OCT converter. So if I want to use the device > 4, the value of NPCS0=0, NPCS1=0, NPCS2=1 and NPCS3=0. > The pins number of different NPCS are : NPCS0=pin98 (PA26), > NPCS1=pin99 (PA27), NPCS2=pin100 (PA28) and NPCS3=pin101 (PA29). The EB55 is actually an M55800A? If so, its pins are not as flexible as the AT91SAM7 devices. There is only one place the SPI pins come out of the chip. > What does the AT91_PIN(.., .., ..) mean? Do I have to define the > AT91_SPI_NPCS1 in my code or in the driver? I think in my code... They are defined in var_io.h in the HAL. You can just use them in your SPI configuration. The default values should be O.K. I suggest you single step through spi_at91_set_npcs(). As it sets the bits you should see the NPCS outputs from the chip change. Check what is going into the demultiplexor and what is coming out of the demultiplexor. Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss