From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.70.40.172 with SMTP id y12mr6979159pdk.8.1407374765264; Wed, 06 Aug 2014 18:26:05 -0700 (PDT) X-Received: by 10.182.110.167 with SMTP id ib7mr122383obb.8.1407374765068; Wed, 06 Aug 2014 18:26:05 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!h18no15361647igc.0!news-out.google.com!px9ni585igc.0!nntp.google.com!h18no9702331igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 6 Aug 2014 18:26:04 -0700 (PDT) In-Reply-To: <1747ffcd-a361-4e0a-8c74-e331597f310a@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=99.224.184.56; posting-account=1sGSewoAAAABLExeWf8EQfa8tzBBdK-D NNTP-Posting-Host: 99.224.184.56 References: <1747ffcd-a361-4e0a-8c74-e331597f310a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <56ecf57c-15f5-4ebd-9d43-e4fd86bbd7dc@googlegroups.com> Subject: Re: GNAT SPARK:Embedded ARM Ada Project doesn't run in STM32F429 Discovery Board From: alexander.ribero.ovalle@gmail.com Injection-Date: Thu, 07 Aug 2014 01:26:05 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:21499 Date: 2014-08-06T18:26:04-07:00 List-Id: 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.