Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/clocking.h@596:d25a30803853, 2015-07-21 (annotated)
- Committer:
- ersatzavian
- Date:
- Tue Jul 21 14:09:45 2015 -0700
- Revision:
- 596:d25a30803853
- Parent:
- 525:c320967f86b9
added missing bracket probably I hope
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_official | 525:c320967f86b9 | 1 | /***************************************************************************//** |
| mbed_official | 525:c320967f86b9 | 2 | * @file clocking.h |
| mbed_official | 525:c320967f86b9 | 3 | * @brief Clock selection calculations |
| mbed_official | 525:c320967f86b9 | 4 | ******************************************************************************* |
| mbed_official | 525:c320967f86b9 | 5 | * @section License |
| mbed_official | 525:c320967f86b9 | 6 | * <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b> |
| mbed_official | 525:c320967f86b9 | 7 | ******************************************************************************* |
| mbed_official | 525:c320967f86b9 | 8 | * |
| mbed_official | 525:c320967f86b9 | 9 | * Permission is granted to anyone to use this software for any purpose, |
| mbed_official | 525:c320967f86b9 | 10 | * including commercial applications, and to alter it and redistribute it |
| mbed_official | 525:c320967f86b9 | 11 | * freely, subject to the following restrictions: |
| mbed_official | 525:c320967f86b9 | 12 | * |
| mbed_official | 525:c320967f86b9 | 13 | * 1. The origin of this software must not be misrepresented; you must not |
| mbed_official | 525:c320967f86b9 | 14 | * claim that you wrote the original software. |
| mbed_official | 525:c320967f86b9 | 15 | * 2. Altered source versions must be plainly marked as such, and must not be |
| mbed_official | 525:c320967f86b9 | 16 | * misrepresented as being the original software. |
| mbed_official | 525:c320967f86b9 | 17 | * 3. This notice may not be removed or altered from any source distribution. |
| mbed_official | 525:c320967f86b9 | 18 | * |
| mbed_official | 525:c320967f86b9 | 19 | * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no |
| mbed_official | 525:c320967f86b9 | 20 | * obligation to support this Software. Silicon Labs is providing the |
| mbed_official | 525:c320967f86b9 | 21 | * Software "AS IS", with no express or implied warranties of any kind, |
| mbed_official | 525:c320967f86b9 | 22 | * including, but not limited to, any implied warranties of merchantability |
| mbed_official | 525:c320967f86b9 | 23 | * or fitness for any particular purpose or warranties against infringement |
| mbed_official | 525:c320967f86b9 | 24 | * of any proprietary rights of a third party. |
| mbed_official | 525:c320967f86b9 | 25 | * |
| mbed_official | 525:c320967f86b9 | 26 | * Silicon Labs will not be liable for any consequential, incidental, or |
| mbed_official | 525:c320967f86b9 | 27 | * special damages, or any other relief, or for any claim by any third party, |
| mbed_official | 525:c320967f86b9 | 28 | * arising from your use of this Software. |
| mbed_official | 525:c320967f86b9 | 29 | * |
| mbed_official | 525:c320967f86b9 | 30 | ******************************************************************************/ |
| mbed_official | 525:c320967f86b9 | 31 | |
| mbed_official | 525:c320967f86b9 | 32 | #include "device_peripherals.h" |
| mbed_official | 525:c320967f86b9 | 33 | |
| mbed_official | 525:c320967f86b9 | 34 | #if( CORE_CLOCK_SOURCE == HFXO) |
| mbed_official | 525:c320967f86b9 | 35 | #define REFERENCE_FREQUENCY HFXO_FREQUENCY |
| mbed_official | 525:c320967f86b9 | 36 | #elif( CORE_CLOCK_SOURCE == HFRCO) |
| mbed_official | 525:c320967f86b9 | 37 | #if( HFRCO_FREQUENCY == CMU_HFRCOCTRL_BAND_1MHZ) |
| mbed_official | 525:c320967f86b9 | 38 | #define REFERENCE_FREQUENCY 1000000 |
| mbed_official | 525:c320967f86b9 | 39 | #elif(HFRCO_FREQUENCY == CMU_HFRCOCTRL_BAND_7MHZ) |
| mbed_official | 525:c320967f86b9 | 40 | #define REFERENCE_FREQUENCY 7000000 |
| mbed_official | 525:c320967f86b9 | 41 | #elif(HFRCO_FREQUENCY == CMU_HFRCOCTRL_BAND_11MHZ) |
| mbed_official | 525:c320967f86b9 | 42 | #define REFERENCE_FREQUENCY 7000000 |
| mbed_official | 525:c320967f86b9 | 43 | #elif(HFRCO_FREQUENCY == CMU_HFRCOCTRL_BAND_14MHZ) |
| mbed_official | 525:c320967f86b9 | 44 | #define REFERENCE_FREQUENCY 14000000 |
| mbed_official | 525:c320967f86b9 | 45 | #elif(HFRCO_FREQUENCY == CMU_HFRCOCTRL_BAND_21MHZ) |
| mbed_official | 525:c320967f86b9 | 46 | #define REFERENCE_FREQUENCY 21000000 |
| mbed_official | 525:c320967f86b9 | 47 | #elif(HFRCO_FREQUENCY == CMU_HFRCOCTRL_BAND_28MHZ) |
| mbed_official | 525:c320967f86b9 | 48 | #define REFERENCE_FREQUENCY 28000000 |
| mbed_official | 525:c320967f86b9 | 49 | #else |
| mbed_official | 525:c320967f86b9 | 50 | #define REFERENCE_FREQUENCY 14000000 |
| mbed_official | 525:c320967f86b9 | 51 | #endif |
| mbed_official | 525:c320967f86b9 | 52 | #endif |
| mbed_official | 525:c320967f86b9 | 53 | |
| mbed_official | 525:c320967f86b9 | 54 | #if ( defined(CMU_CTRL_HFLE) && (REFERENCE_FREQUENCY > 24000000) ) |
| mbed_official | 525:c320967f86b9 | 55 | #define LEUART_REF_FREQ (REFERENCE_FREQUENCY / 4) |
| mbed_official | 525:c320967f86b9 | 56 | #else |
| mbed_official | 525:c320967f86b9 | 57 | #define LEUART_REF_FREQ (REFERENCE_FREQUENCY / 2) |
| mbed_official | 525:c320967f86b9 | 58 | #endif |
