From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13733 invoked by alias); 21 Nov 2008 15:53:43 -0000 Received: (qmail 13672 invoked by uid 22791); 21 Nov 2008 15:53:42 -0000 X-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SARE_PROLOSTOCK_SYM3 X-Spam-Check-By: sourceware.org Received: from anchor-post-1.mail.demon.net (HELO anchor-post-1.mail.demon.net) (195.173.77.132) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 21 Nov 2008 15:52:52 +0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-1.mail.demon.net with esmtp (Exim 4.69) id 1L3YJN-0003CY-h0; Fri, 21 Nov 2008 15:52:49 +0000 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id 75C81138764; Fri, 21 Nov 2008 15:52:43 +0000 (GMT) To: Chris Holgate Cc: ecos-devel@ecos.sourceware.org Subject: Re: STM32 - I/O pullup and EXTI issues, plus new SPI driver. References: <1227280292.8476.47.camel@hercules.zynaptic.com> From: Nick Garnett Original-Sender: nickg@ecoscentric.com Date: Fri, 21 Nov 2008 15:53:00 -0000 In-Reply-To: <1227280292.8476.47.camel@hercules.zynaptic.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2008-11/txt/msg00045.txt.bz2 Chris Holgate writes: > Hi folks, > > I came across a couple of HAL issues while putting together my new SPI > driver for the STM32. I appreciate that the maintainers are overloaded > with eCos 3.0 work at the moment, so I'll defer to them as to whether > any of this needs fixing now and can provide more information/patches on > request. > > 1) It's not possible to set pullups on I/Os using the provided > functions. This is a trivial one-line fix to stm32-misc.c. > > 2) External interrupts don't work as they stand. This requires a few > changes to the STM32 var_intr.h. If required I can tidy up my changes > there and provide a patch which I've tested using a single I/O > (EXTINT0), but which would probably benefit from a bit more testing > using other I/O configurations. I can easily believe that both of these don't quite work. I didn't do much testing in this area, so any changes to make it work are appreciated. > 3) I've now got full register maps for the AFIO, DMA and SPI blocks. > For development purposes I've kept these in a separate file from the > STM32 var_io.h, but can provide the file for merging if required. So long as they match the existing naming and layout conventions these can be added to var_io.h very easily. > > FYI, I now have a DMA-based SPI driver that is fully functional in > kernel mode, but will need one or two changes (and some testing!) to > make it play nicely in non-kernel mode. Probably best to leave that > until the 3.0 release is done, though. You can mainly test polled operation in the kernel just by temporarily forcing the polled parameter to true. -- Nick Garnett eCos Kernel Architect eCosCentric Limited http://www.eCosCentric.com The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No: 4422071