public inbox for ecos-bugs@sourceware.org help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1001068] New: Bug in serial driver when using Parity (Even or Odd) Date: Thu, 04 Nov 2010 20:51:00 -0000 [thread overview] Message-ID: <bug-1001068-13@http.bugs.ecos.sourceware.org/> (raw) Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001068 Summary: Bug in serial driver when using Parity (Even or Odd) Product: eCos Version: 3.0 Platform: stm32e_eval (ST STM3210E EVAL board) OS/Version: Cortex-M Status: UNCONFIRMED Severity: normal Priority: low Component: Serial AssignedTo: unassigned@bugs.ecos.sourceware.org ReportedBy: pme.neratec@gmx.ch CC: ecos-bugs@ecos.sourceware.org Class: Advice Request stm32_serial.h defines the following "translation" (see http://ecos.sourceware.org/cgi-bin/cvsweb.cgi/ecos/packages/devs/serial/cortexm/stm32/current/src/stm32_serial.h?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=ecos): // Translate system parity selector into local values. static cyg_uint32 select_parity[] = { 0, // No parity CYGHWR_HAL_STM32_UART_CR1_PCE|CYGHWR_HAL_STM32_UART_CR1_PS_EVEN, // Even parity CYGHWR_HAL_STM32_UART_CR1_PCE|CYGHWR_HAL_STM32_UART_CR1_PS_ODD, // Odd parity 0, // Mark (1) parity -- not supported 0 // Space (0) parity -- not supported }; But - when selecting a parity (EVEN or ODD), you must also configure the M9-Bit on the stm32. If you don't, you end up sending 7 databits and 1 parity bit (instead of sending 8 databits and 1 parity bit). Therefore the correct "translation" array must look like this: // Translate system parity selector into local values. static cyg_uint32 select_parity[] = { 0, // No parity CYGHWR_HAL_STM32_UART_CR1_PCE|CYGHWR_HAL_STM32_UART_CR1_PS_EVEN|CYGHWR_HAL_STM32_UART_CR1_M_9, // Even parity CYGHWR_HAL_STM32_UART_CR1_PCE|CYGHWR_HAL_STM32_UART_CR1_PS_ODD|CYGHWR_HAL_STM32_UART_CR1_M_9, // Odd parity 0, // Mark (1) parity -- not supported 0 // Space (0) parity -- not supported }; -- 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.
next reply other threads:[~2010-11-04 20:51 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-11-04 20:51 bugzilla-daemon [this message] 2010-11-22 9:43 ` [Bug 1001068] " bugzilla-daemon 2010-12-21 19:38 ` bugzilla-daemon 2010-12-31 9:40 ` bugzilla-daemon 2013-02-02 20:43 ` bugzilla-daemon -- strict thread matches above, loose matches on Subject: below -- 2010-11-04 20:51 [Bug 1001068] New: " bugzilla-daemon
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-1001068-13@http.bugs.ecos.sourceware.org/ \ --to=bugzilla-daemon@bugs.ecos.sourceware.org \ --cc=ecos-bugs@ecos.sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).