AnsweredAssumed Answered

RCC_AHB1PeriphClockCmd could not be resolved

Question asked by Mahjoub.Youssif on May 23, 2015
Latest reply on May 27, 2015 by Majerle.Tilen
Hello again,

Im decided to switch my first project stm32 from the HAL driver library to the SPL. I was able to get a blinky program working using the STCubeMX software and Kei1 with the HAL drives, but i want to write the code om my own in Eclipse. Everything seems to be working, but i can't figure out why i cannot resolve RCC_AHB1PeriphClockCmd().

I believe i have included all the necessary files. I went into  stm32f10x_conf.h and uncommented _gpio.h, _rcc.h, and also uncommitted #define STM32F10X_MD and #define USE_STDPERIPH_DRIVER in  stm32f10x.h but im still getting errors.  I also tried to include _rcc.h directly into main as you can see in my code with no luck. Any suggestions?

#include <stm32f10x.h>
#include <stm32f10x_conf.h>
#include <stdio.h>
#include <stdlib.h>
#include "diag/Trace.h"
#include "stm32f1-stdperiph\stm32f10x_rcc.h"
 
#define GPIO_PORT       GPIOC
#define GPIO_PIN        GPIO_PIN_13
 
//Prototypes
void GPIO_Init(void);
 
GPIO_InitTypeDef GPIO_InitStruct;
 
int main(/*int argc, char* argv[]*/)
{
  // At this stage the system clock should have already been configured
  // at high speed.
  // Infinite loop
  while (1)
    {
       // Add your code here.
    }
  return 0;
}
 
void GPIO_Init(void) {
    RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC, ENABLE);
}


Outcomes