public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] SPI support bug in STM32 port
@ 2009-02-09 22:35 Igor B. Poretsky
  2009-02-10  9:21 ` Nick Garnett
  2009-02-10  9:21 ` Chris Holgate
  0 siblings, 2 replies; 4+ messages in thread
From: Igor B. Poretsky @ 2009-02-09 22:35 UTC (permalink / raw)
  To: ecos-discuss

Hello!

STM32 port does not compile when SPI bus3 is enabled. Here is a simple
patch that fixes the issue:

Index: packages/devs/spi/cortexm/stm32/current/src/spi_stm32.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/spi/cortexm/stm32/current/src/spi_stm32.c,v
retrieving revision 1.2
diff -u -r1.2 spi_stm32.c
--- packages/devs/spi/cortexm/stm32/current/src/spi_stm32.c	5 Feb 2009 10:52:49 -0000	1.2
+++ packages/devs/spi/cortexm/stm32/current/src/spi_stm32.c	9 Feb 2009 20:29:51 -0000
@@ -206,7 +206,7 @@
   .spi_reg_base                     = CYGHWR_HAL_STM32_SPI3,
   .dma_reg_base                     = CYGHWR_HAL_STM32_DMA2,
   .dma_tx_channel                   = 2,
-  .dma_rx_channel                   = 1
+  .dma_rx_channel                   = 1,
   .cs_gpio_num                      = sizeof (bus3_cs_gpio_list),
   .cs_gpio_list                     = bus3_cs_gpio_list,
   .spi_gpio_list                    = bus3_spi_gpio_list,

Best regards,
Igor.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] SPI support bug in STM32 port
  2009-02-09 22:35 [ECOS] SPI support bug in STM32 port Igor B. Poretsky
  2009-02-10  9:21 ` Nick Garnett
@ 2009-02-10  9:21 ` Chris Holgate
  2009-02-10  9:32   ` Nick Garnett
  1 sibling, 1 reply; 4+ messages in thread
From: Chris Holgate @ 2009-02-10  9:21 UTC (permalink / raw)
  To: Igor B. Poretsky; +Cc: ecos-discuss

Hi Igor,

Good find.  Obviously I'd neglected to test SPI3 due to the pinout
conflict with the debug port.  Using SPI3 relies on the user having
previously disabled the debug port in CYGHWR_HAL_STM32_AFIO_MAPR and I
was thinking it might be useful to add this information to the CDL
description for SPI3.

Do you have an FSF copyright assignment in place?  If not, I can
generate a similar patch and submit it to the patches mailing list.

Chris.


Igor B. Poretsky wrote:
> Hello!
> 
> STM32 port does not compile when SPI bus3 is enabled. Here is a simple
> patch that fixes the issue:
> 
> Index: packages/devs/spi/cortexm/stm32/current/src/spi_stm32.c
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/devs/spi/cortexm/stm32/current/src/spi_stm32.c,v
> retrieving revision 1.2
> diff -u -r1.2 spi_stm32.c
> --- packages/devs/spi/cortexm/stm32/current/src/spi_stm32.c	5 Feb 2009 10:52:49 -0000	1.2
> +++ packages/devs/spi/cortexm/stm32/current/src/spi_stm32.c	9 Feb 2009 20:29:51 -0000
> @@ -206,7 +206,7 @@
>    .spi_reg_base                     = CYGHWR_HAL_STM32_SPI3,
>    .dma_reg_base                     = CYGHWR_HAL_STM32_DMA2,
>    .dma_tx_channel                   = 2,
> -  .dma_rx_channel                   = 1
> +  .dma_rx_channel                   = 1,
>    .cs_gpio_num                      = sizeof (bus3_cs_gpio_list),
>    .cs_gpio_list                     = bus3_cs_gpio_list,
>    .spi_gpio_list                    = bus3_spi_gpio_list,
> 
> Best regards,
> Igor.
> 


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] SPI support bug in STM32 port
  2009-02-09 22:35 [ECOS] SPI support bug in STM32 port Igor B. Poretsky
@ 2009-02-10  9:21 ` Nick Garnett
  2009-02-10  9:21 ` Chris Holgate
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2009-02-10  9:21 UTC (permalink / raw)
  To: Igor B. Poretsky; +Cc: ecos-discuss

"Igor B. Poretsky" <poretsky@mlbox.ru> writes:

> Hello!
> 
> STM32 port does not compile when SPI bus3 is enabled. Here is a simple
> patch that fixes the issue:

Thanks, applied.

Note that it is usually better to post things like this to the patches
list. 

-- 
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
Besuchen Sie uns vom 3.-5.03.09 auf der Embedded World 2009, Stand 11-300
Visit us at Embedded World 2009, Nürnberg, Germany, 3-5 Mar, Stand 11-300


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] SPI support bug in STM32 port
  2009-02-10  9:21 ` Chris Holgate
@ 2009-02-10  9:32   ` Nick Garnett
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2009-02-10  9:32 UTC (permalink / raw)
  To: Chris Holgate; +Cc: Igor B. Poretsky, ecos-discuss

Chris Holgate <chris@zynaptic.com> writes:

> Hi Igor,
> 
> Good find.  Obviously I'd neglected to test SPI3 due to the pinout
> conflict with the debug port.  Using SPI3 relies on the user having
> previously disabled the debug port in CYGHWR_HAL_STM32_AFIO_MAPR and I
> was thinking it might be useful to add this information to the CDL
> description for SPI3.
> 
> Do you have an FSF copyright assignment in place?  If not, I can
> generate a similar patch and submit it to the patches mailing list.

There's no need for a copyright assignment for such a trivial
change. This is really no different from Igor pointing out the missing
comma by other means.

As you can see, I've already made this change. If you want to add some
extra text to the description for the pin conflict, please feel free
to submit a patch.


-- 
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
Besuchen Sie uns vom 3.-5.03.09 auf der Embedded World 2009, Stand 11-300
Visit us at Embedded World 2009, Nürnberg, Germany, 3-5 Mar, Stand 11-300


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-10  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-09 22:35 [ECOS] SPI support bug in STM32 port Igor B. Poretsky
2009-02-10  9:21 ` Nick Garnett
2009-02-10  9:21 ` Chris Holgate
2009-02-10  9:32   ` Nick Garnett

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).