comp.lang.ada
 help / color / mirror / Atom feed
From: embeddedrelatedmike@scriptoriumdesigns.com
Subject: Re: GNAT SPARK:Embedded ARM Ada Project doesn't run in STM32F429 Discovery Board
Date: Tue, 5 Aug 2014 20:24:49 -0700 (PDT)
Date: 2014-08-05T20:24:49-07:00	[thread overview]
Message-ID: <1747ffcd-a361-4e0a-8c74-e331597f310a@googlegroups.com> (raw)
In-Reply-To: <b3147de5-1c42-48ac-9153-6950f2a31846@googlegroups.com>

I've got it running on this board
http://www.mouser.com/ProductDetail/STMicroelectronics/STM32F4DISCOVERY/?qs=sGAEpiMZZMutVogd4PRSvEN8XDBeCtgD

See my c.l.a. post today on Ada on $15 hardware.

It's quite possible that the clock and enabling code is different for the different chip.  One thing that often gets forgotten with STM32 chips is that each GPIO port has a separate enable.  Have you set the enable for port G, in the proper register?

The code will look something like this:

   procedure Initialize is
      RCC_AHB1ENR_GPIOD : constant Word := 16#08#;
      RCC_AHB1ENR_GPIOE : constant Word := 16#10#;
   begin
      --  Enable clock for GPIO-D and GPIO-E
      RCC.AHB1ENR := RCC.AHB1ENR or RCC_AHB1ENR_GPIOD or RCC_AHB1ENR_GPIOE;

Do you have this code for GPIOG, using the correct RCC register?

Afterwards comes the configuration of the port bits:

      --  Configure PD12-15
      GPIOD.MODER   (12 .. 15) := (others => Mode_OUT);
      GPIOD.OTYPER  (12 .. 15) := (others => Type_PP);
      GPIOD.OSPEEDR (12 .. 15) := (others => Speed_100MHz);
      GPIOD.PUPDR   (12 .. 15) := (others => No_Pull);
      ....


  reply	other threads:[~2014-08-06  3:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  3:13 GNAT SPARK:Embedded ARM Ada Project doesn't run in STM32F429 Discovery Board alexander.ribero.ovalle
2014-08-06  3:24 ` embeddedrelatedmike [this message]
2014-08-07  1:26   ` alexander.ribero.ovalle
2014-08-06  4:53 ` embeddedrelatedmike
2014-08-07  1:23   ` alexander.ribero.ovalle
2014-08-07  2:41 ` alexander.ribero.ovalle
2014-08-16 20:05 ` Jerry Petrey
2014-09-08 21:25   ` gnlnops
2014-09-09  2:06   ` Jerry Petrey
2014-09-10 20:10     ` gnlnops
2014-09-12 21:34       ` Jerry Petrey
2014-09-14  4:49         ` Anh Vo
2014-09-22 21:07           ` Jerry Petrey
2014-09-14 21:08         ` gnlnops
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox