1) I started with the demo project and I am changing the values in mcuconf.h and board.h to match my hardware. I figure if I can start with a simple program to map things over, will make this process a little easier.
a) What does STM32_HSE_BYPASS mean? On my board I am using a 8Mhz crystal, so I entered in the values as such:
Code: Select all
#define STM32_PLLM_VALUE 8
#define STM32_PLLN_VALUE 336
#define STM32_PLLP_VALUE 2
#define STM32_PLLQ_VALUE 7And made the changes for where my high and low speed clock are coming from:
Code: Select all
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED TRUE
#define STM32_HSE_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
#define STM32_CLOCK48_REQUIRED TRUE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSEThis was basically brought over from my older code. I need to look through the docs some more but to make sure I am using these properly, do I need HSI enabled if I am using HSE? Seems like I would not.
What does STM32_HSE_BYPASS mean when used?
b) When I compile and run, this is the back trace:
Code: Select all
0 0x08000e4c in stm32_clock_init () at /Users/grimepoch/mac-build/ChibiOS/os/hal/ports/STM32/STM32F7xx/hal_lld.c:201
#1 __early_init () at /Users/grimepoch/mac-build/ChibiOS/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c:80
#2 0x080001f6 in Reset_Handler ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
and tracing that back into the hal_lld.c:
Code: Select all
while ((RCC->CR & RCC_CR_HSERDY) == 0)
Which would seem to me that I am not setting up the HSE properly? So it's not ready? Thoughts?