From c81052a256108492ee2e8e7d7db93faa62ee9812 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 19 Feb 2017 14:11:24 +0100 Subject: [PATCH] atmel-samd: Stop calibrating the crystal for Gemma and Trinket. We need the space for other code. --- atmel-samd/boards/cplay_m0_flash/mpconfigboard.h | 2 +- atmel-samd/boards/gemma_m0/mpconfigboard.h | 2 -- atmel-samd/boards/gemma_m0/mpconfigboard.mk | 2 +- atmel-samd/boards/trinket_m0/mpconfigboard.h | 2 -- atmel-samd/boards/trinket_m0/mpconfigboard.mk | 2 +- atmel-samd/main.c | 4 ++-- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/atmel-samd/boards/cplay_m0_flash/mpconfigboard.h b/atmel-samd/boards/cplay_m0_flash/mpconfigboard.h index 942da9cfd0..c8ece7ad37 100644 --- a/atmel-samd/boards/cplay_m0_flash/mpconfigboard.h +++ b/atmel-samd/boards/cplay_m0_flash/mpconfigboard.h @@ -37,4 +37,4 @@ #define BOARD_FLASH_SIZE (0x00040000 - 0x2000) -#define CRYSTALLESS 1 +#define CALIBRATE_CRYSTALLESS 1 diff --git a/atmel-samd/boards/gemma_m0/mpconfigboard.h b/atmel-samd/boards/gemma_m0/mpconfigboard.h index 1b1e635a66..165522fab7 100644 --- a/atmel-samd/boards/gemma_m0/mpconfigboard.h +++ b/atmel-samd/boards/gemma_m0/mpconfigboard.h @@ -14,5 +14,3 @@ #include "internal_flash.h" #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) - -#define CRYSTALLESS 1 diff --git a/atmel-samd/boards/gemma_m0/mpconfigboard.mk b/atmel-samd/boards/gemma_m0/mpconfigboard.mk index 99ddbafadf..8e1b732081 100644 --- a/atmel-samd/boards/gemma_m0/mpconfigboard.mk +++ b/atmel-samd/boards/gemma_m0/mpconfigboard.mk @@ -1,4 +1,4 @@ -LD_FILE = boards/samd21x18-bootloader-crystalless.ld +LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x8015 diff --git a/atmel-samd/boards/trinket_m0/mpconfigboard.h b/atmel-samd/boards/trinket_m0/mpconfigboard.h index 693b2b7308..e72b0a8eb8 100644 --- a/atmel-samd/boards/trinket_m0/mpconfigboard.h +++ b/atmel-samd/boards/trinket_m0/mpconfigboard.h @@ -14,5 +14,3 @@ #include "internal_flash.h" #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) - -#define CRYSTALLESS 1 diff --git a/atmel-samd/boards/trinket_m0/mpconfigboard.mk b/atmel-samd/boards/trinket_m0/mpconfigboard.mk index 99ddbafadf..8e1b732081 100644 --- a/atmel-samd/boards/trinket_m0/mpconfigboard.mk +++ b/atmel-samd/boards/trinket_m0/mpconfigboard.mk @@ -1,4 +1,4 @@ -LD_FILE = boards/samd21x18-bootloader-crystalless.ld +LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x8015 diff --git a/atmel-samd/main.c b/atmel-samd/main.c index d01ea86685..17be1123b5 100644 --- a/atmel-samd/main.c +++ b/atmel-samd/main.c @@ -183,7 +183,7 @@ void reset_samd21(void) { pwmout_reset(); -#ifdef CRYSTALLESS +#ifdef CALIBRATE_CRYSTALLESS // If we are on USB lets double check our fine calibration for the clock and // save the new value if its different enough. if (mp_msc_enabled) { @@ -463,7 +463,7 @@ void samd21_init(void) { uint16_t dfll_fine_calibration = 0x1ff; -#ifdef CRYSTALLESS +#ifdef CALIBRATE_CRYSTALLESS // This is stored in an NVM page after the text and data storage but before // the optional file system. The first 16 bytes are the identifier for the // section.