cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 GPIO clock

zaouche
Associate
Posted on July 25, 2015 at 03:18

Hello

I have an STM32F429 discovery board

I program it with : STM32-Matlab/target (embedded target for Matlab and Simulink), STM32CubMx (configuration tool) and the toolchain: Keil uVision5 (lite).

I tray a very simple Simulink program, which consist of blinking a LED (PG13, green LED).

For this purpose, I used a ramp generator, from simulink sources, (period 1s, 5% ramle ratio).

The output of the generator is connected to the GPIO_Write block (pin PG13)

The GPIO pin 13 configuration is set as :

GPIO_Mode: OUT

GPIO_Speed : Low

type: pull up

when I download the code in the board, the LED is fired but it doesn't blink

what can I do to resolve this problem ?

thank you for your help

best regards

RCC_AHB1PeriphClockCmd

(

RCC_AHB1Periph_GPIOD

,

ENABLE

)

;

RCC_AHB1PeriphClockCmd

(

RCC_AHB1Periph_GPIOD

,

ENABLE

)

;

#!stm32f4-disco #gpio
3 REPLIES 3
Posted on July 25, 2015 at 03:34

Look at the generated source code and step through it with the debugger?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zaouche
Associate
Posted on July 25, 2015 at 13:59

Hello clive1

it seems to me, that the GPIO-clock enabling (validation) is not done.

how can I enable the GPIO clock in the STM32CubeMx ?

Tank's for the help

Amel NASRI
ST Employee
Posted on July 27, 2015 at 17:50

Hi zaouche.khelil,

In order to confirm that issue is because of a missed clock enabling, please add ''__HAL_RCC_GPIOG_CLK_ENABLE();'' to your code.

Let me know if this resolves the issue.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.