public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] FCR register doesn't exist in AEB-1
@ 2003-09-10  3:14 Carlos Sobrinho
  0 siblings, 0 replies; only message in thread
From: Carlos Sobrinho @ 2003-09-10  3:14 UTC (permalink / raw)
  To: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 2544 bytes --]

Hi, I'm having a little question regarding this code (on the bottom)
in packages/devs/serial/arm/aeb/current/src/aeb_serial.c

I was reading the LH77790 v1.0 Embedded mC user guide and I can't see any 
register named FCR (or FIFO control register). As aeb_serial.h defines it it 
should be in 0xFFFF0008 and I can only see a IIR0 (Interrupt Identification) 
that is only 8 bits long and R, not R/W. So, unless the SH77790B latest 
revision has changed or the manual is wrong, the code shouldn't exist.
I tried using gdb with jtag and it doesn't allow me to write a new value. 
0x01 is always present.

Maybe a minor typo and I know the aeb board is a old one, but its the one I'm 
trying to repair the boot and I was trying to play with its serial port so 
see if it has any serious damage or if its just the boot that got corrupted.

With best regards
Carlos Sobrinho

--------------------------------------------------------------------------
static bool
aeb_serial_config_port(serial_channel *chan, cyg_serial_info_t *new_config, 
bool init)
{
    aeb_serial_info *aeb_chan = (aeb_serial_info *)chan->dev_priv;
    volatile struct serial_port *port = (volatile struct serial_port 
*)aeb_chan->base;
    unsigned short baud_divisor = select_baud[new_config->baud];
    unsigned char _lcr, _ier;
    if (baud_divisor == 0) return false;
    _ier = port->REG_IER;
    port->REG_IER = 0;  // Disable port interrupts while changing hardware
    _lcr = select_word_length[new_config->word_length - 
CYGNUM_SERIAL_WORD_LENGTH_5] | 
        select_stop_bits[new_config->stop] |
        select_parity[new_config->parity];
    port->REG_LCR = _lcr;
    port->REG_LCR |= LCR_DL;
    port->REG_MDL = baud_divisor >> 8;
    port->REG_LDL = baud_divisor & 0xFF;
    port->REG_LCR &= ~LCR_DL;
    if (init) {
        port->REG_FCR = 0x07;  // Enable and clear FIFO
        ^^^^^^^^^^^^^^^^^^^^^
        if (chan->out_cbuf.len != 0) {
            port->REG_IER = IER_RCV;
        } else {
            port->REG_IER = 0;
        }
        port->REG_MCR = MCR_INT|MCR_DTR|MCR_RTS;  // Master interrupt enable
    } else {
        port->REG_IER = _ier;
    }
    if (new_config != &chan->config) {
        chan->config = *new_config;
    }
    return true;
}

-- 
#############################################################################
# O muito torna-se pouco com desejar um pouco mais. -- Francisco de Quevedo #
#############################################################################

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-10  3:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-10  3:14 [ECOS] FCR register doesn't exist in AEB-1 Carlos Sobrinho

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).