This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001068] Bug in serial driver when using Parity (Even or Odd)


Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001068

John Dallaway <john@dallaway.org.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEEDINFO
                 CC|                            |john@dallaway.org.uk
         AssignedTo|unassigned@bugs.ecos.source |john@dallaway.org.uk
                   |ware.org                    |
     Ever Confirmed|0                           |1

--- Comment #1 from John Dallaway <john@dallaway.org.uk> 2010-11-22 09:34:58 GMT ---
Phil, thank you for the bug report. Your proposed fix does not accommodate the
STM32 7 data bits + parity bit mode (where the M bit should be clear).

In effect, STM32 requires the word length to be specified inclusive of the
parity bit. Since the word length is represented by a single bit only, I
suggest we abandon the select_word_length array and calculate word_length in
stm32_serial_config_port() as follows:

  cyg_uint32 word_length =
    ((new_config->word_length == CYGNUM_SERIAL_WORD_LENGTH_8) &&
    (new_config->parity != CYGNUM_SERIAL_PARITY_NONE)) ?
    CYGHWR_HAL_STM32_UART_CR1_M_9 : CYGHWR_HAL_STM32_UART_CR1_M_8;

Do you concur?

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]