comp.lang.ada
 help / color / mirror / Atom feed
From: alexander.ribero.ovalle@gmail.com
Subject: Re: GNAT SPARK:Embedded ARM Ada Project doesn't run in STM32F429 Discovery Board
Date: Wed, 6 Aug 2014 18:26:04 -0700 (PDT)
Date: 2014-08-06T18:26:04-07:00	[thread overview]
Message-ID: <56ecf57c-15f5-4ebd-9d43-e4fd86bbd7dc@googlegroups.com> (raw)
In-Reply-To: <1747ffcd-a361-4e0a-8c74-e331597f310a@googlegroups.com>

On Tuesday, August 5, 2014 11:24:49 PM UTC-4, embeddedr...@scriptoriumdesigns.com wrote:
> 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);
> 
>       ....

Thanks. I had enabled the GPIOG bit in the RCC.AHB1ENR register, but still the program doesn't work.

It might be related to enabling the CPU clock, because it seems as if the application doesn't run.


  reply	other threads:[~2014-08-07  1:26 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
2014-08-07  1:26   ` alexander.ribero.ovalle [this message]
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