[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gen68360 & termios



sebastian ssmoller wrote:
> On Tue, 09 Nov 2004 23:07:14 +0100
> "Thomas Doerfler" <Thomas.Doerfler at imd-systems.de> wrote:
> 
> 
>>Sebastian,
>>
>>I have an extended version of the gen68360 console driver, it is 
>>attached to this mail. It supports up to 2 SMCs and 4 SCCs as 
>>serial devices. Is this enough? :-)
> 
> 
> cool :) - much thx - i wil test this as soon as i get access to the
> boards again 
> 
> (...)

Once Sebastian tests this can it be merged onto the development trunk
Thomas?

>>>>>any ideas while a simple tcgetattr & tcsetattr (without changing
>>>>>anything ) causes my stdout to be broken ?
>>>
>>>what about this - i thought just getting and (re)setting the attr's
>>>would have no effect ... 
>>
>>Hm. It is broken. hm.
>>So, what is broken? Can you be more specific?
> 
> 
> hhmm thats a bit difficult ...
> so the output looks like the baud rate has changed but of course i havnt
> changed anything. anyway, even if i change the baud rate to the correct
> value (which is 38400) i get this bogus output.
> 
> i should mention that i had to hack things of console/console.c to get
> it running:
> 
> - first i had to set the default console_baud_rate to 38400 (hardcoded)
>   cause i was unable to set it using tcsetattr on system startup
> - i had to disable interrupts although i know that smc1 irqs work with
>   this board
> - and i had to change/comment out the following part of the code:
> 
>   m360.pbdir =& 0x0003;
>   m360.pbdbr =& 0xff3f;
> 
>   /*
>   m360.brgc1 = M360_BRG_RST;
>   m360.brgc1 = smc1BRGC(console_baud_rate);
>   */
> 
>   i must admit that i never looked up what this code really does - i
>   just took i from another project where it work fine *shame*

Without looking at the code, does it have the mapping of attributes
to hardware right?  THis is an area of code that is seldom used by
the original BSP developer and filled with easy details to get wrong.
Do a simple desk check on the stop bits, parity, and baud rate
mapping from termios to hardware in the driver.

> 
> 
> THX again
> regards,
> seb
> 
>>wkr,
>>Thomas.
>>
>>
>>>(...)
>>>
>>>THX,
>>>seb
>>>
>>>-- 
>>>"Perfection is achieved, not when there is nothing left to add, 
>>>but when there is nothing left to take away."  
>>>--- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 
>>
>>--------------------------------------------
>>IMD Ingenieurbuero fuer Microcomputertechnik
>>Thomas Doerfler           Herbststrasse 8
>>D-82178 Puchheim          Germany
>>email:    Thomas.Doerfler at imd-systems.de
>>PGP public key available at: http://www.imd-
>>systems.de/pgp_keys.htm
>>
>>
> 
> 
> 


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985