Page 1 of 2

STM32F105 clock configuration

Posted: Thu Jan 19, 2017 9:03 am
by omcdr
I'm trying to configure clock in mcuconf.h for STM32F105.

I have #define STM32_HSECLK 8000000 in board.h, I have chcecked it in CubeMX Image

Here is my mcuconf.h

Code: Select all

#define STM32F107_MCUCONF

/*
 * HAL driver system settings.
 */
#define STM32_NO_INIT                       FALSE
#define STM32_HSI_ENABLED                   TRUE
#define STM32_LSI_ENABLED                   FALSE
#define STM32_HSE_ENABLED                   TRUE
#define STM32_LSE_ENABLED                   FALSE
#define STM32_SW                            STM32_SW_PLL
#define STM32_PLLSRC                        STM32_PLLSRC_PREDIV1
#define STM32_PREDIV1SRC                    STM32_PREDIV1SRC_HSE
#define STM32_PREDIV1_VALUE                 1
#define STM32_PLLMUL_VALUE                  9
#define STM32_PREDIV2_VALUE                 1
#define STM32_PLL2MUL_VALUE                 8
#define STM32_PLL3MUL_VALUE                 8
#define STM32_HPRE                          STM32_HPRE_DIV1
#define STM32_PPRE1                         STM32_PPRE1_DIV2
#define STM32_PPRE2                         STM32_PPRE2_DIV1
#define STM32_ADCPRE                        STM32_ADCPRE_DIV2
#define STM32_OTG_CLOCK_REQUIRED            TRUE
#define STM32_OTGFSPRE                      STM32_OTGFSPRE_DIV3
#define STM32_I2S_CLOCK_REQUIRED            FALSE
#define STM32_MCOSEL                        STM32_MCOSEL_PLL3
#define STM32_RTCSEL                        STM32_RTCSEL_HSEDIV
#define STM32_PVD_ENABLE                    FALSE
#define STM32_PLS                           STM32_PLS_LEV0


but I got errors:
In file included from ../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../chibios/os/hal/include/hal.h:32,
from ../chibios/os/hal/src/hal.c:25:
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:468:22: warning: "STM32_MCOSEL_PLL2DIV2" is not defined [-Wundef]
(STM32_MCOSEL == STM32_MCOSEL_PLL2DIV2) || \
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:557:2: error: #error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:584:2: error: #error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:769:2: error: #error "STM32_ADCCLK exceeding maximum frequency (STM32_ADCCLK_MAX)"
#error "STM32_ADCCLK exceeding maximum frequency (STM32_ADCCLK_MAX)"
^
^
In file included from ../chibios/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../chibios/os/hal/include/usb.h:369,
from ../chibios/os/hal/include/hal.h:63,
from ../chibios/os/hal/src/hal.c:25:
../chibios/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h:39:5: warning: "STM32_USB_ACCESS_SCHEME_2x16" is not defined [-Wundef]
#if STM32_USB_ACCESS_SCHEME_2x16
^
../chibios/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h:81:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR
^
In file included from ../chibios/os/hal/include/usb.h:369:0,
from ../chibios/os/hal/include/hal.h:63,
from ../chibios/os/hal/src/hal.c:25:
../chibios/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"


What can be wrong in my configuration ?

Re: STM32F105 clock configuration

Posted: Thu Jan 19, 2017 9:18 am
by Giovanni
Hi,

Are you using an mcuconf.h taken from an F107/f105 demo? it is different from the others.

Giovanni

Re: STM32F105 clock configuration

Posted: Thu Jan 19, 2017 9:29 am
by omcdr
Yes, from
c:\ChibiStudio\chibios26\testhal\STM32F1xx\USB_CDC_F107\mcuconf.h

Re: STM32F105 clock configuration

Posted: Thu Jan 19, 2017 9:38 am
by Giovanni
Is STM32F10X_CL defined in your board.h? apparently it is setup as an F103.

Giovanni

Re: STM32F105 clock configuration

Posted: Thu Jan 19, 2017 9:49 am
by omcdr
I have added, but the same errors.

My board.h is from Olimex STM32-P107

Code: Select all

#define BOARD_OLIMEX_STM32_P107_REV_A
#define BOARD_NAME              "Olimex STM32-P107 Rev.A"

/*
 * Board frequencies.
 */
#define STM32_LSECLK            32768
#define STM32_HSECLK            8000000

/*
 * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
 */
#define STM32F107xC
#define STM32F10X_CL

Re: STM32F105 clock configuration

Posted: Thu Jan 19, 2017 9:52 am
by Giovanni
Are you including the right platform mk file (platform_f105_f107.mk) from your Makefile?

Make sure to take all files from an F107 project.

Giovanni

Re: STM32F105 clock configuration

Posted: Thu Jan 19, 2017 10:07 am
by omcdr
Yes

Code: Select all

# Startup files.
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
#include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
#include $(CHIBIOS)/test/rt/test.mk

#board
include ../boards/STM32F105/board.mk

# Define linker script file here
LDSCRIPT= $(STARTUPLD)/STM32F107xC.ld

Re: STM32F105 clock configuration

Posted: Thu Jan 19, 2017 10:59 am
by Giovanni
It is not possible because this error:

warning: "STM32_USB_ACCESS_SCHEME_2x16" is not defined


Clearly indicates that the project is including the USB driver, not the OTG driver.

It is possible that the files you are looking at are not the files used while compiling.

Giovanni

Re: STM32F105 clock configuration

Posted: Thu Jan 19, 2017 11:27 am
by omcdr
At this moment I don't have "STM32_USB_ACCESS_SCHEME_2x16" error. It was with makefile contains

Code: Select all

include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk



Here is my full output log
11:26:02 **** Build of configuration Default for project tio ****
make -j4 all
Compiler Options
arm-none-eabi-gcc -c -mcpu=cortex-m3 -O0 -std=c99 -ggdb -fomit-frame-pointer -falign-functions=16 -DSTM32F107xC -ffunction-sections -fdata-sections -fno-common -flto -Wall -Wextra -Wundef -Wstrict-prototypes -Wa,-alms=build/lst/ -DCORTEX_USE_FPU=FALSE -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/build.d -I. -I../chibios/os/common/ports/ARMCMx/compilers/GCC -I../chibios/os/common/ports/ARMCMx/devices/STM32F1xx -I../chibios/os/ext/CMSIS/include -I../chibios/os/ext/CMSIS/ST/STM32F1xx -I../chibios/os/rt/include -I../chibios/os/rt/ports/ARMCMx -I../chibios/os/rt/ports/ARMCMx/compilers/GCC -I../chibios/os/hal/osal/rt -I../chibios/os/hal/include -I../chibios/os/hal/ports/common/ARMCMx -I../chibios/os/hal/ports/STM32/STM32F1xx -I../chibios/os/hal/ports/STM32/LLD/DACv1 -I../chibios/os/hal/ports/STM32/LLD/DMAv1 -I../chibios/os/hal/ports/STM32/LLD/EXTIv1 -I../chibios/os/hal/ports/STM32/LLD/GPIOv1 -I../chibios/os/hal/ports/STM32/LLD/I2Cv1 -I../chibios/os/hal/ports/STM32/LLD/MACv1 -I../chibios/os/hal/ports/STM32/LLD/OTGv1 -I../chibios/os/hal/ports/STM32/LLD/RTCv1 -I../chibios/os/hal/ports/STM32/LLD/SDIOv1 -I../chibios/os/hal/ports/STM32/LLD/SPIv1 -I../chibios/os/hal/ports/STM32/LLD/TIMv1 -I../chibios/os/hal/ports/STM32/LLD/USARTv1 -I../chibios/os/hal/ports/STM32/LLD/xWDGv1 -I../boards/STM32F105 -I../chibios/os/various/devices_lib/accel -I../chibios/os/hal/lib/streams -I../chibios/os/various -Itasks/ -Iutils/ -Idrv/ -Icmd/ -Icontrol/ main.c -o main.o

Compiling crt0_v7m.s
Compiling chcoreasm_v7m.s
Compiling crt1.c
Compiling vectors.c
Compiling chsys.c
Compiling chdebug.c
Compiling chvt.c
Compiling chschd.c
Compiling chthreads.c
Compiling chtm.c
Compiling chdynamic.c
Compiling chregistry.c
Compiling chsem.c
Compiling chmtx.c
Compiling chcond.c
Compiling chevents.c
Compiling chmsg.c
Compiling chmboxes.c
Compiling chqueues.c
Compiling chmemcore.c
Compiling chheap.c
Compiling chmempools.c
Compiling chcore.c
Compiling chcore_v7m.c
Compiling osal.c
Compiling hal.c
Compiling st.c
Compiling hal_buffers.c
In file included from ../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../chibios/os/hal/include/hal.h:32,
from ../chibios/os/hal/src/hal.c:25:
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:557:2: error: #error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:573:2: error: #error "STM32_PLL2VCO outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
#error "STM32_PLL2VCO outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:584:2: error: #error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:600:2: error: #error "STM32_PLL3CLKOUT outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
#error "STM32_PLL3CLKOUT outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:627:2: error: #error "STM32_PLLCLKIN outside acceptable range (STM32_PLL1IN_MIN...STM32_PLL1IN_MAX)"
#error "STM32_PLLCLKIN outside acceptable range (STM32_PLL1IN_MIN...STM32_PLL1IN_MAX)"
^
In file included from ../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../chibios/os/hal/include/hal.h:32,
from ../chibios/os/hal/src/st.c:25:
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:557:2: error: #error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:573:2: error: #error "STM32_PLL2VCO outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
#error "STM32_PLL2VCO outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:584:2: error: #error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:600:2: error: #error "STM32_PLL3CLKOUT outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
#error "STM32_PLL3CLKOUT outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:627:2: error: #error "STM32_PLLCLKIN outside acceptable range (STM32_PLL1IN_MIN...STM32_PLL1IN_MAX)"
#error "STM32_PLLCLKIN outside acceptable range (STM32_PLL1IN_MIN...STM32_PLL1IN_MAX)"
^
In file included from ../chibios/os/hal/include/hal.h:49:0,
from ../chibios/os/hal/src/hal.c:25:
../chibios/os/hal/include/dac.h:28:6: warning: "HAL_USE_DAC" is not defined [-Wundef]
#if (HAL_USE_DAC == TRUE) || defined(__DOXYGEN__)
^
In file included from ../chibios/os/hal/include/hal.h:49:0,
from ../chibios/os/hal/src/st.c:25:
../chibios/os/hal/include/dac.h:28:6: warning: "HAL_USE_DAC" is not defined [-Wundef]
#if (HAL_USE_DAC == TRUE) || defined(__DOXYGEN__)
^
In file included from ../chibios/os/hal/include/hal.h:53:0,
from ../chibios/os/hal/src/hal.c:25:
../chibios/os/hal/include/i2s.h:28:6: warning: "HAL_USE_I2S" is not defined [-Wundef]
#if (HAL_USE_I2S == TRUE) || defined(__DOXYGEN__)
^
In file included from ../chibios/os/hal/include/hal.h:53:0,
from ../chibios/os/hal/src/st.c:25:
../chibios/os/hal/include/i2s.h:28:6: warning: "HAL_USE_I2S" is not defined [-Wundef]
#if (HAL_USE_I2S == TRUE) || defined(__DOXYGEN__)
^
Compiling hal_queues.c
In file included from ../chibios/os/hal/include/usb.h:369:0,
from ../chibios/os/hal/include/hal.h:63,
from ../chibios/os/hal/src/hal.c:25:
../chibios/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h:199:2: error: #error "the USB OTG driver requires a 48MHz clock"
#error "the USB OTG driver requires a 48MHz clock"
^
In file included from ../chibios/os/hal/include/usb.h:369:0,
from ../chibios/os/hal/include/hal.h:63,
from ../chibios/os/hal/src/st.c:25:
../chibios/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h:199:2: error: #error "the USB OTG driver requires a 48MHz clock"
#error "the USB OTG driver requires a 48MHz clock"
^
In file included from ../chibios/os/hal/include/hal.h:64:0,
from ../chibios/os/hal/src/st.c:25:
../chibios/os/hal/include/wdg.h:28:6: warning: "HAL_USE_WDG" is not defined [-Wundef]
#if (HAL_USE_WDG == TRUE) || defined(__DOXYGEN__)
^
In file included from ../chibios/os/hal/include/hal.h:64:0,
from ../chibios/os/hal/src/hal.c:25:
../chibios/os/hal/include/wdg.h:28:6: warning: "HAL_USE_WDG" is not defined [-Wundef]
#if (HAL_USE_WDG == TRUE) || defined(__DOXYGEN__)
^
../chibios/os/hal/src/hal.c: In function 'halInit':
../chibios/os/hal/src/hal.c:73:6: warning: "HAL_USE_DAC" is not defined [-Wundef]
#if (HAL_USE_DAC == TRUE) || defined(__DOXYGEN__)
^
../chibios/os/hal/src/hal.c:85:6: warning: "HAL_USE_I2S" is not defined [-Wundef]
#if (HAL_USE_I2S == TRUE) || defined(__DOXYGEN__)
^
../chibios/os/hal/src/hal.c:121:6: warning: "HAL_USE_WDG" is not defined [-Wundef]
#if (HAL_USE_WDG == TRUE) || defined(__DOXYGEN__)
^
make: *** [build/obj/hal.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [build/obj/st.o] Error 1
In file included from ../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../chibios/os/hal/include/hal.h:32,
from ../chibios/os/hal/src/hal_buffers.c:41:
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:557:2: error: #error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:573:2: error: #error "STM32_PLL2VCO outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
#error "STM32_PLL2VCO outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:584:2: error: #error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:600:2: error: #error "STM32_PLL3CLKOUT outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
#error "STM32_PLL3CLKOUT outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:627:2: error: #error "STM32_PLLCLKIN outside acceptable range (STM32_PLL1IN_MIN...STM32_PLL1IN_MAX)"
#error "STM32_PLLCLKIN outside acceptable range (STM32_PLL1IN_MIN...STM32_PLL1IN_MAX)"
^
In file included from ../chibios/os/hal/include/hal.h:49:0,
from ../chibios/os/hal/src/hal_buffers.c:41:
../chibios/os/hal/include/dac.h:28:6: warning: "HAL_USE_DAC" is not defined [-Wundef]
#if (HAL_USE_DAC == TRUE) || defined(__DOXYGEN__)
^
In file included from ../chibios/os/hal/include/hal.h:53:0,
from ../chibios/os/hal/src/hal_buffers.c:41:
../chibios/os/hal/include/i2s.h:28:6: warning: "HAL_USE_I2S" is not defined [-Wundef]
#if (HAL_USE_I2S == TRUE) || defined(__DOXYGEN__)
^
In file included from ../chibios/os/hal/include/usb.h:369:0,
from ../chibios/os/hal/include/hal.h:63,
from ../chibios/os/hal/src/hal_buffers.c:41:
../chibios/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h:199:2: error: #error "the USB OTG driver requires a 48MHz clock"
#error "the USB OTG driver requires a 48MHz clock"
^
In file included from ../chibios/os/hal/include/hal.h:64:0,
from ../chibios/os/hal/src/hal_buffers.c:41:
../chibios/os/hal/include/wdg.h:28:6: warning: "HAL_USE_WDG" is not defined [-Wundef]
#if (HAL_USE_WDG == TRUE) || defined(__DOXYGEN__)
^
make: *** [build/obj/hal_buffers.o] Error 1
In file included from ../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../chibios/os/hal/include/hal.h:32,
from ../chibios/os/hal/src/hal_queues.c:38:
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:557:2: error: #error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL2CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:573:2: error: #error "STM32_PLL2VCO outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
#error "STM32_PLL2VCO outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:584:2: error: #error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
#error "STM32_PLL3CLKIN outside acceptable range (STM32_PLL23IN_MIN...STM32_PLL23IN_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:600:2: error: #error "STM32_PLL3CLKOUT outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
#error "STM32_PLL3CLKOUT outside acceptable range (STM32_PLL23VCO_MIN...STM32_PLL23VCO_MAX)"
^
../chibios/os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:627:2: error: #error "STM32_PLLCLKIN outside acceptable range (STM32_PLL1IN_MIN...STM32_PLL1IN_MAX)"
#error "STM32_PLLCLKIN outside acceptable range (STM32_PLL1IN_MIN...STM32_PLL1IN_MAX)"
^
In file included from ../chibios/os/hal/include/hal.h:49:0,
from ../chibios/os/hal/src/hal_queues.c:38:
../chibios/os/hal/include/dac.h:28:6: warning: "HAL_USE_DAC" is not defined [-Wundef]
#if (HAL_USE_DAC == TRUE) || defined(__DOXYGEN__)
^
In file included from ../chibios/os/hal/include/hal.h:53:0,
from ../chibios/os/hal/src/hal_queues.c:38:
../chibios/os/hal/include/i2s.h:28:6: warning: "HAL_USE_I2S" is not defined [-Wundef]
#if (HAL_USE_I2S == TRUE) || defined(__DOXYGEN__)
^
In file included from ../chibios/os/hal/include/usb.h:369:0,
from ../chibios/os/hal/include/hal.h:63,
from ../chibios/os/hal/src/hal_queues.c:38:
../chibios/os/hal/ports/STM32/LLD/OTGv1/usb_lld.h:199:2: error: #error "the USB OTG driver requires a 48MHz clock"
#error "the USB OTG driver requires a 48MHz clock"
^
In file included from ../chibios/os/hal/include/hal.h:64:0,
from ../chibios/os/hal/src/hal_queues.c:38:
../chibios/os/hal/include/wdg.h:28:6: warning: "HAL_USE_WDG" is not defined [-Wundef]
#if (HAL_USE_WDG == TRUE) || defined(__DOXYGEN__)
^
make: *** [build/obj/hal_queues.o] Error 1

11:26:08 Build Finished (took 6s.23ms)


Re: STM32F105 clock configuration

Posted: Thu Jan 19, 2017 11:32 am
by Giovanni
The "out of range" errors are caused by wrong clock settings.

The "undefined" errors are likely caused by an outdated halconf.h.

Please make sure to take ALL files from an F107 demo in the same VERSION you are using.

Giovanni