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]

RE: Does AT91 SPI driver support external SPI devices?


I thought too that the multiplexor had a problem. Following your concil, I read the evaluation user guide with more attention. There is no jumper but a line to cut (see attached). I cutted it and now, RedBoot doen't boot anymore on my board. Is RedBoot installed in the DataFlash memory? Here is my RedBoot version return : 
 
RedBoot> version
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 20:04:38, Jul 15 2003
Platform: Atmel AT91/EB55 (ARM7TDMI) 
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
RAM: 0x02000000-0x02040000, 0x02006948-0x0203f000 available
FLASH: 0x01000000 - 0x01200000, 32 blocks of 0x00010000 bytes each.
RedBoot> 
 
PS:I installed a jumper to reclose this connection.
 
--
Stéphane JULIEN
 
Ing. dipl. HES en informatique
Rue Baptiste-Savoye 26
CH - 2610 Saint-Imier
Bureau : +41 32 930 22 08
Privé : +41 78 889 14 47
stephane.julien@he-arc.ch

________________________________

On Thu, Mar 01, 2007 at 11:15:17AM +0100, Julien St?phane wrote:
> Mornin',
>

> I have tested the code you gave me to test the GPIO functiuns and it
> works well! So the problem doesn't become from the GPIO
> functions. They works under AT91M55800A.

O.K. That is good. It is one thing less to worry about.

> To understand what the multiplexor does, I have studied its datasheet. If I would like to activate the NSPICS5, I have to put the next values:NSPCS0=1, NSPCS1=0, NSPCS2=1, NSPCS0=3. I did it with the next code. By this way, I think that the dev_num value is ignored. Am I right? :
>
> static void
> spi_at91_set_npcs(cyg_spi_at91_bus_t *spi_bus,int val)
> {
>    HAL_ARM_AT91_GPIO_PUT(AT91_SPI_NPCS0, 1);
>    HAL_ARM_AT91_GPIO_PUT(AT91_SPI_NPCS1, 0);
>    HAL_ARM_AT91_GPIO_PUT(AT91_SPI_NPCS2, 1);
>    HAL_ARM_AT91_GPIO_PUT(AT91_SPI_NPCS3, 0);
> }
>

> As I was not sure of the NPCS3 value, I tried to change it and no
> changes appeared. I made many measures before/after the multioplexor
> and on the final board's pins. I checked the connections between
> pins of board and multiplexor, they are OK. No changes appears on
> the final board's pins.

So you are saying that the input to the multiplexor is working as
expected, but the output from the multiplex is not?

> Are you sure that the switches inside the processor are closed (see
> attached schema)? I have never seen this operation... If I want to
> close it anyway, have I got to use the HAL_WRITE_UINT32 function
> with the address and the value of the corresponding register?

Those are set via the HAL_ARM_AT91_GPIO_CFG_DIRECTION macro in the
function spi_at91_init_bus(). If the output from the processors is
working as expected, it means this cannot be the problem.

So it sounds like the multiplexor is the problem. Does it have a chip
select line? Do you need to set a jumper to enable it?

       Andrew

Attachment: CB9.JPG
Description: CB9.JPG

-- 
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]