>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

Reply via email to