Demo for STM32F2 doesn't complie

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
User avatar
part1zan_
Posts: 44
Joined: Sun Sep 08, 2013 9:04 pm

Demo for STM32F2 doesn't complie

Post by part1zan_ »

I'm trying to build an STM32F205VCT6-supporting binary. Using a demo for an STM32F4Discovery (slightly modified though), I get the following errors:

Code: Select all

Compiling test.c
In file included from ChibiOS-RT/os/hal/include/hal.h:36,
                 from ChibiOS-RT/test/test.c:26:
ChibiOS-RT/os/hal/platforms/STM32F4xx/hal_lld.h:1337:2: error: #error "STM32_PLLCLKOUT outside acceptable range (STM32_PLLOUT_MIN...STM32_PLLOUT_MAX)"
ChibiOS-RT/os/hal/platforms/STM32F4xx/hal_lld.h:1357:2: error: #error "STM32_SYSCLK above maximum rated frequency (STM32_SYSCLK_MAX)"
ChibiOS-RT/os/hal/platforms/STM32F4xx/hal_lld.h:1426:2: error: #error "STM32_HCLK exceeding maximum frequency (STM32_SYSCLK_MAX)"
ChibiOS-RT/os/hal/platforms/STM32F4xx/hal_lld.h:1450:2: error: #error "STM32_PCLK1 exceeding maximum frequency (STM32_PCLK1_MAX)"
ChibiOS-RT/os/hal/platforms/STM32F4xx/hal_lld.h:1474:2: error: #error "STM32_PCLK2 exceeding maximum frequency (STM32_PCLK2_MAX)"
make: *** [build/obj/test.o] Error 1

I slightly modified Makefile and board.h to fit the change from STM32F4 to STM32F2, yet I get the errors. What can I do to fix that?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Demo for STM32F2 doesn't complie

Post by Giovanni »

Edit mcuconf.h in ordet to obtain frequencies compatible with the F2. The maximum is 120mhz for that one.

Giovanni
User avatar
part1zan_
Posts: 44
Joined: Sun Sep 08, 2013 9:04 pm

Re: Demo for STM32F2 doesn't complie

Post by part1zan_ »

Hm, could you tell me which values in mcuconf.h I should change?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Demo for STM32F2 doesn't complie

Post by Giovanni »

Try

#define STM32_PLLN_VALUE 240

#define STM32_PLLQ_VALUE 5

Giovanni
User avatar
part1zan_
Posts: 44
Joined: Sun Sep 08, 2013 9:04 pm

Re: Demo for STM32F2 doesn't complie

Post by part1zan_ »

It worked, thank you very much.
Post Reply