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: Why is PIO blocking UART?


Hi Tom,

I think the SPI driver might be a problem for you, the default ecos
configuration for AT91SAM7S is not correct, try this:

cdl_option CYGDAT_DEVS_SPI_ARM_AT91_BUS0_NPCS2 {
    # Flavor: data
    # No user value, uncomment the following line to provide one.
    user_value NONE
    # value_source default
    # Default value: AT91_SPI_NPCS2
};

cdl_option CYGDAT_DEVS_SPI_ARM_AT91_BUS0_NPCS3 {
    # Flavor: data
    # No user value, uncomment the following line to provide one.
    user_value NONE
    # value_source default
    # Default value: AT91_SPI_NPCS2
};

Christophe

-----Original Message-----
From: info@mikeycard.org [mailto:info@mikeycard.org] 
Sent: 2. mai 2010 13:26
To: Christophe Coutand
Cc: ecos-discuss@ecos.sourceware.org
Subject: RE: [ECOS] Why is PIO blocking UART?

Hi Christophe,


Thanks for your questions.

I had to solder on some headers to answer your first question, which  
immediately answers your third question, I guess. See the schematics  
of the board here:
http://www.mikeycard.org/images/phase1/pdf%20mikeycard%20phase%201%20spi
n2%20axe.zip

Sorry for not mentioning the desired baud rate. Indeed only ser0 needs  
to be 115200 and the others can be 38400.

As for the result of the tests; with the buspirate I do see the first  
byte 0x55 of ser0 and then stuff happens to the buspirate's buffer,  
however that's probably the buspirate's fault and nothing with eCos.  
So ser0 does seem to be outputting without and weird poking in  
registers.

However without the poke haldiag or ser2 do not output anything. How  
can that be?


Cheers,
Tom


Christophe Coutand <ccoutand@stmi.com>:

> Do you see the string being written on /dev/ser0 coming on your
> terminal?
>
> Have you noticed the baud rate on serial0 is set to 115200 while it is
> 38400 for the other interface?
>
> cdl_option CYGNUM_IO_SERIAL_ARM_AT91_SERIAL0_BAUD {
>     # Flavor: data
>     user_value 115200
>     # value_source user
>     # Default value: 38400
>     # Legal values:  50 75 110 "134_5" 150 200 300 600 1200 1800 2400
> 3600
>     #                           4800 7200 9600 14400 19200 38400 57600
> 115200 230400
>     #
> };
>
> Are you using your own HW or is it an evaluation board?
>
> Christophe
>
>
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of
> info@mikeycard.org
> Sent: 30. april 2010 13:58
> To: ecos-discuss@ecos.sourceware.org
> Subject: [ECOS] Why is PIO blocking UART?
>
> Hi,
>
>
> I?m working on a board that?s very similar to the AT91SAM7SEK but with
> the 512kb version of the chip, see mikeycard.org for more info.
>
> My goal is to accomplish the following:
> UART0           -> RAW in and output
>                 -> via DMA (PDC), not blocking no interrupt necessary
>                 -> dev/ser0
> UART1           -> RAW in and output
>                 -> interrupt driven, may be slow
>                 -> dev/ser1
> debug UART      -> TTY mode in and output
>                 -> printf & diag_printf
>                 -> dev/ser2
>
> Results so far:
> RedBoot runs.
> Made a build environment and extended the serial.c example. See here:
> http://dl.dropbox.com/u/1002097/mikeycard.zip
> After debugging gotten result by disabling the PIO (an ugly hack)
> HAL_WRITE_UINT32(0xfffff404, 0x600 );
> Tried to make the config according to
>
http://www.mail-archive.com/ecos-discuss@ecos.sourceware.org/msg09664.ht
> ml
> printf ( CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE ) = "/dev/ttydiag"
> diag_printf ( CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL ) = 2
> CYGDAT_IO_SERIAL_TTY_CONSOLE = "/dev/ttydiag"
> Devtab for ser0, ser1, ser2
>
> Problem description:
> - No output on haldiag or ser2 without the magic poke in the PIO
> Disable Register
> - No input on haldiag or ser2 when JTAG (J-link) is attached (not like
> this with RedBoot)
> - After printing ?Trying to read /dev/ser Cross fingers ?, the program
> waits for input on ser0 but never gets out of err = cyg_io_read(
> handle_ser, readbuffer, &len_ser );
>
> Question:
> What do I need to do / set to get working config?
> I?m developing on Ubuntu with gcc, openocd and insight.
>
> Any and all help appreciated.
>
>
>
> Kind regards,
> Tom
>
> --
> Before posting, please read the FAQ:
http://ecos.sourceware.org/fom/ecos
> and search the list archive:
http://ecos.sourceware.org/ml/ecos-discuss
>
>



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