Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Toggling GPIO's on STM32F429

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302

See if this works. Compiled for 8 MHz. mikroC PRO ARM code. Led blinks very one second.
 

Attachments

  • STM32F429II LED Blink.rar
    214.9 KB · Views: 40
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
This is the whole code?
Code:
void main() {
  GPIO_Digital_Output(&GPIOG_BASE, _GPIO_PINMASK_ALL); // Set PORTB as digital output
  
  GPIOG_ODR = 0;
  

  while(1) {
    GPIOG_ODR.B13 = ~GPIOG_ODR.B13;
    Delay_ms(1000);
  }
}
You didn't include any libraries?
 

Ye, but it is mikroC PRO ARM Compiler code. To compile my code for different clock frequency just download and install the demo version of mikroC PRO ARM Compiler from mikroElektronika.
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
My goal is to understand exactly what happens - not just to make the LED blink.
Can you post the whole code please - with the initialization functions and the include statements.
 

In post #2 I have provided the whole C code.
 

I don't really understand...where are your include statements?
I'm using IAR...
 

Please read the posts properly. The code I have posted is for "mikroC PRO ARM Compiler" and not IAR ARM. Please post your IAR ARM C Code. I will test it.
 

Problem solved.
I didn't initialize the GPIOs properly...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top