allow override of XOSC_MHZ (#644)
* And increased assertion limit to 50 as 15 was the limit for the oscillator but not for XIN
This commit is contained in:
parent
d7358e4ed8
commit
da476610e2
@ -36,7 +36,10 @@
|
||||
|
||||
#define PIO_INSTRUCTION_COUNT _u(32)
|
||||
|
||||
// PICO_CONFIG: XOSC_MHZ, The crystal oscillator frequency in Mhz, type=int, default=12, advanced=true, group=hardware_base
|
||||
#ifndef XOSC_MHZ
|
||||
#define XOSC_MHZ _u(12)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
#include "hardware/regs/xosc.h"
|
||||
#include "hardware/xosc.h"
|
||||
|
||||
#if XOSC_MHZ < 1 || XOSC_MHZ > 15
|
||||
#error XOSC_MHZ must be in the range 1-15
|
||||
#if XOSC_MHZ < 1 || XOSC_MHZ > 50
|
||||
#error XOSC_MHZ must be in the range 1-50
|
||||
#endif
|
||||
|
||||
#define STARTUP_DELAY (((((XOSC_MHZ * MHZ) / 1000) + 128) / 256) * PICO_XOSC_STARTUP_DELAY_MULTIPLIER)
|
||||
|
Loading…
Reference in New Issue
Block a user