public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Fw: strange UART behaviour while running ecos
       [not found] <1331824622.13037.YahooMailNeo@web160301.mail.bf1.yahoo.com>
@ 2012-03-16  4:47 ` tayyaba azeem
       [not found]   ` <CAOHvnTP8aO_13hObD38EeNPdwB6maoVfsw5vCkpOAeVhFzuTrw@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: tayyaba azeem @ 2012-03-16  4:47 UTC (permalink / raw)
  To: ecos-discuss


>Hi all,
> 
>I am kind of new to leon3 but I have successfully run ecos from prom and have also accessed GPIO via a simple C application. I am using ML501 board. And now I was trying to send and receive data via uart but I observed a strange behavior that data does get transmitted and received over uart but it's not what I send! To elaborate, I've written a simple code which only transmits a byte when it receives a byte but if I send 0x36 to PC I receive 0xf5 and no matter what else I send I receive 0xf6 only on my PC. But the strange thing I've found is that if I transmit more than one byte from leon3 (say 2 or 3 bytes data) I receive infinite bytes on my PC and they only stop once I reset the CPU or switch the board off.
> 
>Here's a summary of what I have tried to troubleshoot just to help anyone who tries to diagnose the problem.
> 
>I am using ecos-rep-1.0.9 and have booted from rom and have accessed an led via GPIO successfully so I feel boot code is fine.
>My clock frequency is 40 MHz and baud rate 38400.
>I have checked the APBUART initialization in ecos with baudrate and flow control enabled and have gone through the APBUART initialization code in the repository couldn't find any bug there though.
>But to be on the safe side I have initialized the uart myself again in my c file (i have enabled receive and transmit and flow control and disabled DB bit) the scaler register is 81hex. 
>My fifosize is 4 bytes but nothing has helped so far.
>Moreover, today I tried to send/receive data over uart using grmon for this I wrote:
> 
>char c;
>scanf("%c", &c);
>printf("%c", c);
> 
>but the character was never printed not even in TSIM.
> 
>Any help to get around this problem is highly appreciated. 
> 
>Best Regards,
>Tayyaba Azeem 

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] Fw: strange UART behaviour while running ecos
       [not found]       ` <CAOHvnTPWeHeWutsQY4nftuFHQ1vMbvjx_Z_E=mp8k=VOuat-iQ@mail.gmail.com>
@ 2012-03-20 12:59         ` Michael Bergandi
  2012-03-21  5:17           ` tayyaba azeem
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Bergandi @ 2012-03-20 12:59 UTC (permalink / raw)
  To: tayyaba azeem; +Cc: eCos Discuss List

And there I go forgetting to include the list...

> Tayyaba,
>
>> Thanks Mike but I solved it thank God. It's working now.
>
> Glad you got it working. Please make sure to reply all or copy the
> list so that others will know you solved your problem, so you don't
> waste someones time trying to help you.
>
>> Does eCos 3.0 support LEON3 may be I don't remember correctly so I'll check again. It does support Leon though.
>
> Yes, I see a LEON hal, but no mention of LEON3. Sounds like you are
> working from a very old port from some manufacturer that did not
> contribute the port back. Hence, it has been unmaintained. Perhaps you
> would be interested in updating it and contributing it. Mind you, I
> have no idea what level of effort that would entail from your starting
> place.
>
> Carry on. Wishing you well on your development.
>
> Mike
>
>
>
> --
> Mike



-- 
Mike

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] Fw: strange UART behaviour while running ecos
  2012-03-20 12:59         ` Michael Bergandi
@ 2012-03-21  5:17           ` tayyaba azeem
  0 siblings, 0 replies; 3+ messages in thread
From: tayyaba azeem @ 2012-03-21  5:17 UTC (permalink / raw)
  To: Michael Bergandi; +Cc: eCos Discuss List

> And there I go forgetting to include the list...
 
never mind it happens. but yeah i was so busy trying to fix the problem couldn't find time to check anything else and now it's my pleasure to announce that I got it working.
 
>> Yes, I see a LEON hal, but no mention of LEON3. Sounds like you are
>> working from a very old port from some manufacturer that did not
>> contribute the port back. Hence, it has been unmaintained.Perhaps you
>> would be interested in updating it and contributing it. Mind you, I
>> have no idea what level of effort that would entail from your starting
>> place.

yea may be you are right since that port is not part of ecos latest release. And just to share how I solved it: I chose a different baud rate. So, I believe the strange behaviour had to do with physical media. Since the serial cable and PC work for quite a range of baud rates, so I believe it had to do with LEON3 processor support somehow. If someone could share more on the baud rates LEON3 supports I would appreciate.
 
Thanks and Regards, 
Tayyaba Azeem


----- Original Message -----
> From: Michael Bergandi <mbergandi@gmail.com>
> To: tayyaba azeem <u04175@yahoo.com>
> Cc: eCos Discuss List <ecos-discuss@ecos.sourceware.org>
> Sent: Tuesday, March 20, 2012 5:59 PM
> Subject: Re: [ECOS] Fw: strange UART behaviour while running ecos
> 
> And there I go forgetting to include the list...
> 
>> Tayyaba,
>> 
>>> Thanks Mike but I solved it thank God. It's working now.
>> 
>> Glad you got it working. Please make sure to reply all or copy the
>> list so that others will know you solved your problem, so you don't
>> waste someones time trying to help you.
>> 
>>> Does eCos 3.0 support LEON3 may be I don't remember correctly so 
> I'll check again. It does support Leon though.
>> 
>> Yes, I see a LEON hal, but no mention of LEON3. Sounds like you are
>> working from a very old port from some manufacturer that did not
>> contribute the port back. Hence, it has been unmaintained. Perhaps you
>> would be interested in updating it and contributing it. Mind you, I
>> have no idea what level of effort that would entail from your starting
>> place.
>> 
>> Carry on. Wishing you well on your development.
>> 
>> Mike
>> 
>> 
>> 
>> --
>> Mike
> 
> 
> 
> -- 
> Mike
>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-21  5:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1331824622.13037.YahooMailNeo@web160301.mail.bf1.yahoo.com>
2012-03-16  4:47 ` [ECOS] Fw: strange UART behaviour while running ecos tayyaba azeem
     [not found]   ` <CAOHvnTP8aO_13hObD38EeNPdwB6maoVfsw5vCkpOAeVhFzuTrw@mail.gmail.com>
     [not found]     ` <1332219168.41542.YahooMailNeo@web160303.mail.bf1.yahoo.com>
     [not found]       ` <CAOHvnTPWeHeWutsQY4nftuFHQ1vMbvjx_Z_E=mp8k=VOuat-iQ@mail.gmail.com>
2012-03-20 12:59         ` Michael Bergandi
2012-03-21  5:17           ` tayyaba azeem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).