fix LPC812 PWM
Fork of mbed-dev by
targets/cmsis/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32PG_STK3401/system_efm32pg1b.h@129:2e517c56bcfb, 2016-05-16 (annotated)
- Committer:
- nameless129
- Date:
- Mon May 16 16:50:30 2016 +0000
- Revision:
- 129:2e517c56bcfb
- Parent:
- 50:a417edff4437
PWM Fix:Duty 0%??H???????????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 50:a417edff4437 | 1 | /***************************************************************************//** |
mbed_official | 50:a417edff4437 | 2 | * @file system_efm32pg1b.h |
mbed_official | 50:a417edff4437 | 3 | * @brief CMSIS Cortex-M3/M4 System Layer for EFM32 devices. |
mbed_official | 50:a417edff4437 | 4 | * @version 4.2.0 |
mbed_official | 50:a417edff4437 | 5 | ****************************************************************************** |
mbed_official | 50:a417edff4437 | 6 | * @section License |
mbed_official | 50:a417edff4437 | 7 | * <b>Copyright 2015 Silicon Laboratories, Inc. http://www.silabs.com</b> |
mbed_official | 50:a417edff4437 | 8 | ****************************************************************************** |
mbed_official | 50:a417edff4437 | 9 | * |
mbed_official | 50:a417edff4437 | 10 | * Permission is granted to anyone to use this software for any purpose, |
mbed_official | 50:a417edff4437 | 11 | * including commercial applications, and to alter it and redistribute it |
mbed_official | 50:a417edff4437 | 12 | * freely, subject to the following restrictions: |
mbed_official | 50:a417edff4437 | 13 | * |
mbed_official | 50:a417edff4437 | 14 | * 1. The origin of this software must not be misrepresented; you must not |
mbed_official | 50:a417edff4437 | 15 | * claim that you wrote the original software.@n |
mbed_official | 50:a417edff4437 | 16 | * 2. Altered source versions must be plainly marked as such, and must not be |
mbed_official | 50:a417edff4437 | 17 | * misrepresented as being the original software.@n |
mbed_official | 50:a417edff4437 | 18 | * 3. This notice may not be removed or altered from any source distribution. |
mbed_official | 50:a417edff4437 | 19 | * |
mbed_official | 50:a417edff4437 | 20 | * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc. |
mbed_official | 50:a417edff4437 | 21 | * has no obligation to support this Software. Silicon Laboratories, Inc. is |
mbed_official | 50:a417edff4437 | 22 | * providing the Software "AS IS", with no express or implied warranties of any |
mbed_official | 50:a417edff4437 | 23 | * kind, including, but not limited to, any implied warranties of |
mbed_official | 50:a417edff4437 | 24 | * merchantability or fitness for any particular purpose or warranties against |
mbed_official | 50:a417edff4437 | 25 | * infringement of any proprietary rights of a third party. |
mbed_official | 50:a417edff4437 | 26 | * |
mbed_official | 50:a417edff4437 | 27 | * Silicon Laboratories, Inc. will not be liable for any consequential, |
mbed_official | 50:a417edff4437 | 28 | * incidental, or special damages, or any other relief, or for any claim by |
mbed_official | 50:a417edff4437 | 29 | * any third party, arising from your use of this Software. |
mbed_official | 50:a417edff4437 | 30 | * |
mbed_official | 50:a417edff4437 | 31 | *****************************************************************************/ |
mbed_official | 50:a417edff4437 | 32 | |
mbed_official | 50:a417edff4437 | 33 | #ifndef SYSTEM_EFM32_H |
mbed_official | 50:a417edff4437 | 34 | #define SYSTEM_EFM32_H |
mbed_official | 50:a417edff4437 | 35 | |
mbed_official | 50:a417edff4437 | 36 | #ifdef __cplusplus |
mbed_official | 50:a417edff4437 | 37 | extern "C" { |
mbed_official | 50:a417edff4437 | 38 | #endif |
mbed_official | 50:a417edff4437 | 39 | |
mbed_official | 50:a417edff4437 | 40 | #include <stdint.h> |
mbed_official | 50:a417edff4437 | 41 | |
mbed_official | 50:a417edff4437 | 42 | /******************************************************************************* |
mbed_official | 50:a417edff4437 | 43 | ************************** GLOBAL VARIABLES ******************************* |
mbed_official | 50:a417edff4437 | 44 | ******************************************************************************/ |
mbed_official | 50:a417edff4437 | 45 | |
mbed_official | 50:a417edff4437 | 46 | extern uint32_t SystemCoreClock; /**< System Clock Frequency (Core Clock) */ |
mbed_official | 50:a417edff4437 | 47 | extern uint32_t SystemHfrcoFreq; /**< System HFRCO frequency */ |
mbed_official | 50:a417edff4437 | 48 | |
mbed_official | 50:a417edff4437 | 49 | /******************************************************************************* |
mbed_official | 50:a417edff4437 | 50 | ***************************** PROTOTYPES ********************************** |
mbed_official | 50:a417edff4437 | 51 | ******************************************************************************/ |
mbed_official | 50:a417edff4437 | 52 | |
mbed_official | 50:a417edff4437 | 53 | void Reset_Handler(void); |
mbed_official | 50:a417edff4437 | 54 | void NMI_Handler(void); |
mbed_official | 50:a417edff4437 | 55 | void HardFault_Handler(void); |
mbed_official | 50:a417edff4437 | 56 | void MemManage_Handler(void); |
mbed_official | 50:a417edff4437 | 57 | void BusFault_Handler(void); |
mbed_official | 50:a417edff4437 | 58 | void UsageFault_Handler(void); |
mbed_official | 50:a417edff4437 | 59 | void SVC_Handler(void); |
mbed_official | 50:a417edff4437 | 60 | void DebugMon_Handler(void); |
mbed_official | 50:a417edff4437 | 61 | void PendSV_Handler(void); |
mbed_official | 50:a417edff4437 | 62 | void SysTick_Handler(void); |
mbed_official | 50:a417edff4437 | 63 | |
mbed_official | 50:a417edff4437 | 64 | void EMU_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 65 | void WDOG_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 66 | void LDMA_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 67 | void GPIO_EVEN_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 68 | void TIMER0_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 69 | void USART0_RX_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 70 | void USART0_TX_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 71 | void ACMP0_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 72 | void ADC0_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 73 | void IDAC0_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 74 | void I2C0_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 75 | void GPIO_ODD_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 76 | void TIMER1_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 77 | void USART1_RX_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 78 | void USART1_TX_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 79 | void LEUART0_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 80 | void PCNT0_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 81 | void CMU_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 82 | void MSC_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 83 | void LETIMER0_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 84 | void RTCC_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 85 | void CRYOTIMER_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 86 | |
mbed_official | 50:a417edff4437 | 87 | #if (__FPU_PRESENT == 1) |
mbed_official | 50:a417edff4437 | 88 | void FPUEH_IRQHandler(void); |
mbed_official | 50:a417edff4437 | 89 | #endif |
mbed_official | 50:a417edff4437 | 90 | |
mbed_official | 50:a417edff4437 | 91 | uint32_t SystemCoreClockGet(void); |
mbed_official | 50:a417edff4437 | 92 | |
mbed_official | 50:a417edff4437 | 93 | /**************************************************************************//** |
mbed_official | 50:a417edff4437 | 94 | * @brief |
mbed_official | 50:a417edff4437 | 95 | * Update CMSIS SystemCoreClock variable. |
mbed_official | 50:a417edff4437 | 96 | * |
mbed_official | 50:a417edff4437 | 97 | * @details |
mbed_official | 50:a417edff4437 | 98 | * CMSIS defines a global variable SystemCoreClock that shall hold the |
mbed_official | 50:a417edff4437 | 99 | * core frequency in Hz. If the core frequency is dynamically changed, the |
mbed_official | 50:a417edff4437 | 100 | * variable must be kept updated in order to be CMSIS compliant. |
mbed_official | 50:a417edff4437 | 101 | * |
mbed_official | 50:a417edff4437 | 102 | * Notice that only if changing the core clock frequency through the EFM CMU |
mbed_official | 50:a417edff4437 | 103 | * API, this variable will be kept updated. This function is only provided |
mbed_official | 50:a417edff4437 | 104 | * for CMSIS compliance and if a user modifies the the core clock outside |
mbed_official | 50:a417edff4437 | 105 | * the CMU API. |
mbed_official | 50:a417edff4437 | 106 | *****************************************************************************/ |
mbed_official | 50:a417edff4437 | 107 | static __INLINE void SystemCoreClockUpdate(void) |
mbed_official | 50:a417edff4437 | 108 | { |
mbed_official | 50:a417edff4437 | 109 | SystemCoreClockGet(); |
mbed_official | 50:a417edff4437 | 110 | } |
mbed_official | 50:a417edff4437 | 111 | |
mbed_official | 50:a417edff4437 | 112 | uint32_t SystemMaxCoreClockGet(void); |
mbed_official | 50:a417edff4437 | 113 | |
mbed_official | 50:a417edff4437 | 114 | void SystemInit(void); |
mbed_official | 50:a417edff4437 | 115 | uint32_t SystemHFClockGet(void); |
mbed_official | 50:a417edff4437 | 116 | |
mbed_official | 50:a417edff4437 | 117 | uint32_t SystemHFXOClockGet(void); |
mbed_official | 50:a417edff4437 | 118 | void SystemHFXOClockSet(uint32_t freq); |
mbed_official | 50:a417edff4437 | 119 | |
mbed_official | 50:a417edff4437 | 120 | uint32_t SystemLFRCOClockGet(void); |
mbed_official | 50:a417edff4437 | 121 | uint32_t SystemULFRCOClockGet(void); |
mbed_official | 50:a417edff4437 | 122 | |
mbed_official | 50:a417edff4437 | 123 | uint32_t SystemLFXOClockGet(void); |
mbed_official | 50:a417edff4437 | 124 | void SystemLFXOClockSet(uint32_t freq); |
mbed_official | 50:a417edff4437 | 125 | |
mbed_official | 50:a417edff4437 | 126 | #ifdef __cplusplus |
mbed_official | 50:a417edff4437 | 127 | } |
mbed_official | 50:a417edff4437 | 128 | #endif |
mbed_official | 50:a417edff4437 | 129 | #endif /* SYSTEM_EFM32_H */ |