public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* Problem with STM32 flash driver on Rev-Z silicon.
@ 2009-01-02 11:19 Chris Holgate
  2009-01-02 11:30 ` Simon Kallweit
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Holgate @ 2009-01-02 11:19 UTC (permalink / raw)
  To: ecos-devel

Hi folks,

I have encountered a problem with the STM32 flash driver on revision Z
devices.  According to the errata document, the debug registers cannot
be accessed from the processor on rev-Z devices   This means that it it
not possible to get the device type by reading CYGHWR_HAL_STM32_MCU_ID,
which causes the flash driver to use invalid parameters.  Maybe it would
be better to rely on the HAL configuration for this information.

I also noticed that the flash and RAM size definitions stored in the
CYGHWR_HAL_STM32_DEV_SIG register are the wrong way round for my device
(ie, the _FSIZE macro gets the RAM size and the _RSIZE macro gets the
flash size).  I don't know if this is an eCos bug or a rev-Z bug, since
the documentation for this register seems a bit vague.

Chris.

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

* Re: Problem with STM32 flash driver on Rev-Z silicon.
  2009-01-02 11:19 Problem with STM32 flash driver on Rev-Z silicon Chris Holgate
@ 2009-01-02 11:30 ` Simon Kallweit
  2009-01-02 16:16   ` Chris Holgate
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Kallweit @ 2009-01-02 11:30 UTC (permalink / raw)
  To: Chris Holgate; +Cc: ecos-devel

Chris Holgate schrieb:
> Hi folks,
>
> I have encountered a problem with the STM32 flash driver on revision Z
> devices.  According to the errata document, the debug registers cannot
> be accessed from the processor on rev-Z devices   This means that it it
> not possible to get the device type by reading CYGHWR_HAL_STM32_MCU_ID,
> which causes the flash driver to use invalid parameters.  Maybe it would
> be better to rely on the HAL configuration for this information.
>   

This bug has already been fixed, it should be in the CVS.

Simon

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

* Re: Problem with STM32 flash driver on Rev-Z silicon.
  2009-01-02 11:30 ` Simon Kallweit
@ 2009-01-02 16:16   ` Chris Holgate
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Holgate @ 2009-01-02 16:16 UTC (permalink / raw)
  To: Simon Kallweit; +Cc: ecos-devel

Simon Kallweit wrote:
> Chris Holgate schrieb:
>> Hi folks,
>>
>> I have encountered a problem with the STM32 flash driver on revision Z
>> devices.  According to the errata document, the debug registers cannot
>> be accessed from the processor on rev-Z devices   This means that it it
>> not possible to get the device type by reading CYGHWR_HAL_STM32_MCU_ID,
>> which causes the flash driver to use invalid parameters.  Maybe it would
>> be better to rely on the HAL configuration for this information.
>>   
> 
> This bug has already been fixed, it should be in the CVS.

Great.  I've just updated from CVS and re-generated my HAL fixes patch.
   My FSF copyright assignment is now in place, so any of these changes
can now be included in the main tree.  The patch file is at:

http://www.zynaptic.com/ecos/patches/stm32_fixes_02_01_09.patch.gz

The patch makes the following changes:

* Adds the .sram memory section to the linker script fragments for the
STM3210E eval board.  This is required by the STM32 SPI driver so that
bounce buffers can be placed in on-chip SRAM.

* Adds SPI and DMA register maps to the STM32 var_io.h for use by the
STM32 SPI driver.

* Adds USB register map to the STM32 var_io.h for use by the STM32 USB
driver.

* Adds GPIO alternate function configuration registers to the STM32
var_io.h so that external interrupts can be set up.

* Fixes STM32 var_io.h register layouts for CYGHWR_HAL_STM32_DEV_SIG and
 CYGHWR_HAL_STM32_RCC_APB1ENR

* Removed EXTI16, EXTI17 and EXTI18 interrupt definitions from STM32
var_intr.h since these alias the PVD, RTC_ALARM and USB_WAKEUP
interrupts respectively.

* Fixed interrupt mask/unmask in STM32 var_intr.h so that external
interrupts work.

* Added interrupt acknowledge to STM32 var_intr.h for external interrupts.

An updated SPI driver for the STM32 will follow imminently.  USB driver
in progress...

Chris.

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

end of thread, other threads:[~2009-01-02 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-02 11:19 Problem with STM32 flash driver on Rev-Z silicon Chris Holgate
2009-01-02 11:30 ` Simon Kallweit
2009-01-02 16:16   ` Chris Holgate

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