From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14185 invoked by alias); 4 Nov 2010 20:51:51 -0000 Received: (qmail 14170 invoked by uid 22791); 4 Nov 2010 20:51:49 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_05,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Nov 2010 20:51:44 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 48) id EF6AD2F78001; Thu, 4 Nov 2010 20:51:41 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1001068] New: Bug in serial driver when using Parity (Even or Odd) X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Serial X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pme.neratec@gmx.ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 04 Nov 2010 20:51:00 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org X-SW-Source: 2010/txt/msg00120.txt.bz2 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 the assignee for the bug.