diff --git a/libraries/mbed/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.c b/libraries/mbed/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.c index 43c441d941..46119472d2 100644 --- a/libraries/mbed/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.c +++ b/libraries/mbed/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.c @@ -62,7 +62,14 @@ void SystemCoreClockUpdate(void) void SystemInit(void) { #if defined(TARGET_NRF_32MHZ_XTAL) - // For 32MHz external XTAL such as Taiyo Yuden + /* For 32MHz HFCLK XTAL such as Taiyo Yuden + Physically, tiny footprint XTAL oscillate higher freq. To make BLE modules smaller, some modules + are using 32MHz XTAL. + This code wriging the value 0xFFFFFF00 to the UICR (User Information Configuration Register) + at address 0x10001008, to make nRF51 works with 32MHz system clock. This register will be overwritten + by SoftDevice to 0xFFFFFFFF, the default value. Each hex files built with mbed classic online compiler + contain SoftDevice, so that, this code run once just after the hex file will be flashed onto nRF51. + After changing the value, nRF51 need to reboot. */ if (*(uint32_t *)0x10001008 == 0xFFFFFFFF) { NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos; diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h index be8ff8b4cf..76e1958aee 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h @@ -1,5 +1,5 @@ /* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor + * Copyright (c) 2015 Nordic Semiconductor * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h index 9d5a5e2109..0a99298a32 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h @@ -1,5 +1,5 @@ /* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited + * Copyright (c) 2006-2015 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.