Gast
#1678845
Hallo,
ich beginne gerade mit IAR Workbench und hab mit den unten gezeigten
Zeilen begonnen
und bekomme folgende Fehlermeldung:
"Error[Pe159]: declaration is incompatible with previous "RCC_Setup"
(declared at line 5) ........"
HIer mein main.c:
#include "stm32f10x_lib.h"
int main()
{
RCC_Setup();
// return 0;
}
void RCC_Setup(void)
{
// RCC system reset(for debug purpose)
RCC_DeInit();
// Enable HSE
RCC_HSEConfig(RCC_HSE_ON);
// Wait till HSE is ready
while(RCC_GetFlagStatus(RCC_FLAG_HSERDY) == RESET)
{;}
// Enable Prefetch Buffer
FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
// Flash 2 wait state
FLASH_SetLatency(FLASH_Latency_2);
// HCLK = SYSCLK
RCC_HCLKConfig(RCC_SYSCLK_Div1);
// PCLK2 = HCLK
RCC_PCLK2Config(RCC_HCLK_Div1);
// PCLK1 = HCLK
RCC_PCLK1Config(RCC_HCLK_Div1);
// Select HSE as system clock source
RCC_SYSCLKConfig(RCC_SYSCLKSource_HSE);
// Wait till HSE is used as system clock source
while(RCC_GetSYSCLKSource() != 0x04)
{;}
// Enable PBs GPIO clock
RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOE,
ENABLE );
}
eingebunden sind: cortexm3_macro.h, stm32f10x_conf.h, stm32f10x_flash.h,
stm32f10x_gpio.h, stm32f10x_lib.h, stm32f10x_map.h, stm32f10x_nvic.h,
stm32f10x_rcc.h, stm32f10x_type.h
bitte um Hilfe