Clock initialization using the SDK, no settings.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14080 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
de273b8b04
commit
33e6532a53
|
@ -121,7 +121,7 @@ LDSCRIPT= $(STARTUPLD)/RP2040_RAM.ld
|
||||||
# setting.
|
# setting.
|
||||||
CSRC = $(ALLCSRC) \
|
CSRC = $(ALLCSRC) \
|
||||||
$(TESTSRC) \
|
$(TESTSRC) \
|
||||||
$(PICOSDKROOT)/src/rp2_common/hardware_clocks/clocks.c \
|
$(CHIBIOS)/os/various/syscalls.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -152,7 +152,7 @@ CPPWARN = -Wall -Wextra -Wundef
|
||||||
#
|
#
|
||||||
|
|
||||||
# List all user C define here, like -D_DEBUG=1
|
# List all user C define here, like -D_DEBUG=1
|
||||||
UDEFS = -DCRT0_VTOR_INIT=1
|
UDEFS = -DCRT0_VTOR_INIT=1 -DPICO_NO_FPGA_CHECK
|
||||||
|
|
||||||
# Define ASM defines here
|
# Define ASM defines here
|
||||||
UADEFS = -DCRT0_VTOR_INIT=1
|
UADEFS = -DCRT0_VTOR_INIT=1
|
||||||
|
|
|
@ -84,8 +84,6 @@ typedef struct {
|
||||||
__IO uint32_t xxx;
|
__IO uint32_t xxx;
|
||||||
} XXX_TypeDef;
|
} XXX_TypeDef;
|
||||||
|
|
||||||
#define XIP_BASE 0x10000000U
|
|
||||||
|
|
||||||
#define PERIPH_BASE 0x40000000U
|
#define PERIPH_BASE 0x40000000U
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
|
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
|
|
||||||
|
/* From Pico-SDK */
|
||||||
|
#include "hardware/clocks.h"
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver local definitions. */
|
/* Driver local definitions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -75,7 +78,7 @@ void hal_lld_init(void) {
|
||||||
void rp_clock_init(void) {
|
void rp_clock_init(void) {
|
||||||
|
|
||||||
#if !RP_NO_INIT
|
#if !RP_NO_INIT
|
||||||
|
clocks_init();
|
||||||
#endif /* RP_NO_INIT */
|
#endif /* RP_NO_INIT */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
#error "RP_XOSCCLK not defined in board.h"
|
#error "RP_XOSCCLK not defined in board.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RP_CORE_CK RP_ROSCCLK
|
#define RP_CORE_CK 125000000
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver data structures and types. */
|
/* Driver data structures and types. */
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
# Pico-SDK files.
|
# Pico-SDK files.
|
||||||
PICOSDKROOT := $(CHIBIOS)/ext/pico-sdk
|
PICOSDKROOT := $(CHIBIOS)/ext/pico-sdk
|
||||||
PICOSDKSRC =
|
|
||||||
|
PICOSDKSRC = $(PICOSDKROOT)/src/rp2_common/hardware_clocks/clocks.c \
|
||||||
|
$(PICOSDKROOT)/src/rp2_common/hardware_pll/pll.c \
|
||||||
|
$(PICOSDKROOT)/src/rp2_common/hardware_watchdog/watchdog.c \
|
||||||
|
$(PICOSDKROOT)/src/rp2_common/hardware_xosc/xosc.c \
|
||||||
|
|
||||||
PICOSDKINC = $(CHIBIOS)//os/various/pico_bindings/dumb/include \
|
PICOSDKINC = $(CHIBIOS)//os/various/pico_bindings/dumb/include \
|
||||||
$(PICOSDKROOT)/src/common/pico_base/include \
|
$(PICOSDKROOT)/src/common/pico_base/include \
|
||||||
|
|
Loading…
Reference in New Issue