How to access Serial port's Line Control Register - VxWorks

This is a discussion on How to access Serial port's Line Control Register - VxWorks ; Hi , I am trying to figure out a way to access the Line Control Register (LCR) of COM1 on a powerpc MCP750 system via vxworks. There does not seem to be a sysOutbyte function or equivalent to access I/O ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to access Serial port's Line Control Register

  1. How to access Serial port's Line Control Register

    Hi ,

    I am trying to figure out a way to access the Line Control Register
    (LCR) of COM1 on a powerpc MCP750 system via vxworks. There does not
    seem to be a sysOutbyte function or equivalent to access I/O address
    directly. Nor does the function ioctl seem to have this functionality.
    I would like to set the break enable (set 6th bit) of the serial port.
    This would be the equivalent of SetCommBreak() for the windows PC. Any
    one have any ideas or can point me in the right direction? Thanks
    alot.

    Walter


  2. Re: How to access Serial port's Line Control Register

    Hi Walter:

    If you can't find an ioctl call to use with the serial driver fo your
    ), then you'll have to write the LCR register directly. Check the
    memory map for your board in the board's header file, the write to the
    register directly. The concept of memory vs. io writes is not present
    on a PowerPC - all devices and memory can be written to directly, so
    sysOutBute or just *(unsigned char))UART_BASE+LCR_OFFSET |= 0x40;
    should do it.

    Good luck,
    lc
    walterwang@gmail.com wrote:
    > Hi ,
    >
    > I am trying to figure out a way to access the Line Control Register
    > (LCR) of COM1 on a powerpc MCP750 system via vxworks. There does not
    > seem to be a sysOutbyte function or equivalent to access I/O address
    > directly. Nor does the function ioctl seem to have this functionality.
    > I would like to set the break enable (set 6th bit) of the serial port.
    > This would be the equivalent of SetCommBreak() for the windows PC. Any
    > one have any ideas or can point me in the right direction? Thanks
    > alot.
    >
    > Walter



+ Reply to Thread