mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Wed Jul 08 14:45:08 2015 +0100
Revision:
585:a1ed5b41f74f
Synchronized with git revision 7a2b57896e0263b82f31ddc5a0ad2443615db184

Full URL: https://github.com/mbedmicro/mbed/commit/7a2b57896e0263b82f31ddc5a0ad2443615db184/

Add rtc_api.c

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 585:a1ed5b41f74f 1 ; ---------------------------------------------------------------------------------------
mbed_official 585:a1ed5b41f74f 2 ; @file: startup_MKL26Z4.s
mbed_official 585:a1ed5b41f74f 3 ; @purpose: CMSIS Cortex-M0P Core Device Startup File
mbed_official 585:a1ed5b41f74f 4 ; MKL26Z4
mbed_official 585:a1ed5b41f74f 5 ; @version: 1.7
mbed_official 585:a1ed5b41f74f 6 ; @date: 2015-2-18
mbed_official 585:a1ed5b41f74f 7 ; @build: b150218
mbed_official 585:a1ed5b41f74f 8 ; ---------------------------------------------------------------------------------------
mbed_official 585:a1ed5b41f74f 9 ;
mbed_official 585:a1ed5b41f74f 10 ; Copyright (c) 1997 - 2015 , Freescale Semiconductor, Inc.
mbed_official 585:a1ed5b41f74f 11 ; All rights reserved.
mbed_official 585:a1ed5b41f74f 12 ;
mbed_official 585:a1ed5b41f74f 13 ; Redistribution and use in source and binary forms, with or without modification,
mbed_official 585:a1ed5b41f74f 14 ; are permitted provided that the following conditions are met:
mbed_official 585:a1ed5b41f74f 15 ;
mbed_official 585:a1ed5b41f74f 16 ; o Redistributions of source code must retain the above copyright notice, this list
mbed_official 585:a1ed5b41f74f 17 ; of conditions and the following disclaimer.
mbed_official 585:a1ed5b41f74f 18 ;
mbed_official 585:a1ed5b41f74f 19 ; o Redistributions in binary form must reproduce the above copyright notice, this
mbed_official 585:a1ed5b41f74f 20 ; list of conditions and the following disclaimer in the documentation and/or
mbed_official 585:a1ed5b41f74f 21 ; other materials provided with the distribution.
mbed_official 585:a1ed5b41f74f 22 ;
mbed_official 585:a1ed5b41f74f 23 ; o Neither the name of Freescale Semiconductor, Inc. nor the names of its
mbed_official 585:a1ed5b41f74f 24 ; contributors may be used to endorse or promote products derived from this
mbed_official 585:a1ed5b41f74f 25 ; software without specific prior written permission.
mbed_official 585:a1ed5b41f74f 26 ;
mbed_official 585:a1ed5b41f74f 27 ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
mbed_official 585:a1ed5b41f74f 28 ; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
mbed_official 585:a1ed5b41f74f 29 ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 585:a1ed5b41f74f 30 ; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
mbed_official 585:a1ed5b41f74f 31 ; ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
mbed_official 585:a1ed5b41f74f 32 ; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
mbed_official 585:a1ed5b41f74f 33 ; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
mbed_official 585:a1ed5b41f74f 34 ; ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mbed_official 585:a1ed5b41f74f 35 ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
mbed_official 585:a1ed5b41f74f 36 ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 585:a1ed5b41f74f 37 ;
mbed_official 585:a1ed5b41f74f 38 ; The modules in this file are included in the libraries, and may be replaced
mbed_official 585:a1ed5b41f74f 39 ; by any user-defined modules that define the PUBLIC symbol _program_start or
mbed_official 585:a1ed5b41f74f 40 ; a user defined start symbol.
mbed_official 585:a1ed5b41f74f 41 ; To override the cstartup defined in the library, simply add your modified
mbed_official 585:a1ed5b41f74f 42 ; version to the workbench project.
mbed_official 585:a1ed5b41f74f 43 ;
mbed_official 585:a1ed5b41f74f 44 ; The vector table is normally located at address 0.
mbed_official 585:a1ed5b41f74f 45 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
mbed_official 585:a1ed5b41f74f 46 ; The name "__vector_table" has special meaning for C-SPY:
mbed_official 585:a1ed5b41f74f 47 ; it is where the SP start value is found, and the NVIC vector
mbed_official 585:a1ed5b41f74f 48 ; table register (VTOR) is initialized to this address if != 0.
mbed_official 585:a1ed5b41f74f 49 ;
mbed_official 585:a1ed5b41f74f 50 ; Cortex-M version
mbed_official 585:a1ed5b41f74f 51 ;
mbed_official 585:a1ed5b41f74f 52
mbed_official 585:a1ed5b41f74f 53 MODULE ?cstartup
mbed_official 585:a1ed5b41f74f 54
mbed_official 585:a1ed5b41f74f 55 ;; Forward declaration of sections.
mbed_official 585:a1ed5b41f74f 56 SECTION CSTACK:DATA:NOROOT(3)
mbed_official 585:a1ed5b41f74f 57
mbed_official 585:a1ed5b41f74f 58 SECTION .intvec:CODE:NOROOT(2)
mbed_official 585:a1ed5b41f74f 59
mbed_official 585:a1ed5b41f74f 60 EXTERN __iar_program_start
mbed_official 585:a1ed5b41f74f 61 EXTERN SystemInit
mbed_official 585:a1ed5b41f74f 62 EXTERN init_data_bss
mbed_official 585:a1ed5b41f74f 63 PUBLIC __vector_table
mbed_official 585:a1ed5b41f74f 64 PUBLIC __vector_table_0x1c
mbed_official 585:a1ed5b41f74f 65 PUBLIC __Vectors
mbed_official 585:a1ed5b41f74f 66 PUBLIC __Vectors_End
mbed_official 585:a1ed5b41f74f 67 PUBLIC __Vectors_Size
mbed_official 585:a1ed5b41f74f 68
mbed_official 585:a1ed5b41f74f 69 DATA
mbed_official 585:a1ed5b41f74f 70
mbed_official 585:a1ed5b41f74f 71 __vector_table
mbed_official 585:a1ed5b41f74f 72 DCD sfe(CSTACK)
mbed_official 585:a1ed5b41f74f 73 DCD Reset_Handler
mbed_official 585:a1ed5b41f74f 74
mbed_official 585:a1ed5b41f74f 75 DCD NMI_Handler ;NMI Handler
mbed_official 585:a1ed5b41f74f 76 DCD HardFault_Handler ;Hard Fault Handler
mbed_official 585:a1ed5b41f74f 77 DCD 0 ;Reserved
mbed_official 585:a1ed5b41f74f 78 DCD 0 ;Reserved
mbed_official 585:a1ed5b41f74f 79 DCD 0 ;Reserved
mbed_official 585:a1ed5b41f74f 80 __vector_table_0x1c
mbed_official 585:a1ed5b41f74f 81 DCD 0 ;Reserved
mbed_official 585:a1ed5b41f74f 82 DCD 0 ;Reserved
mbed_official 585:a1ed5b41f74f 83 DCD 0 ;Reserved
mbed_official 585:a1ed5b41f74f 84 DCD 0 ;Reserved
mbed_official 585:a1ed5b41f74f 85 DCD SVC_Handler ;SVCall Handler
mbed_official 585:a1ed5b41f74f 86 DCD 0 ;Reserved
mbed_official 585:a1ed5b41f74f 87 DCD 0 ;Reserved
mbed_official 585:a1ed5b41f74f 88 DCD PendSV_Handler ;PendSV Handler
mbed_official 585:a1ed5b41f74f 89 DCD SysTick_Handler ;SysTick Handler
mbed_official 585:a1ed5b41f74f 90
mbed_official 585:a1ed5b41f74f 91 ;External Interrupts
mbed_official 585:a1ed5b41f74f 92 DCD DMA0_IRQHandler ;DMA channel 0 transfer complete and error interrupt
mbed_official 585:a1ed5b41f74f 93 DCD DMA1_IRQHandler ;DMA channel 1 transfer complete and error interrupt
mbed_official 585:a1ed5b41f74f 94 DCD DMA2_IRQHandler ;DMA channel 2 transfer complete and error interrupt
mbed_official 585:a1ed5b41f74f 95 DCD DMA3_IRQHandler ;DMA channel 3 transfer complete and error interrupt
mbed_official 585:a1ed5b41f74f 96 DCD Reserved20_IRQHandler ;Reserved interrupt
mbed_official 585:a1ed5b41f74f 97 DCD FTFA_IRQHandler ;FTFA command complete and read collision
mbed_official 585:a1ed5b41f74f 98 DCD LVD_LVW_IRQHandler ;Low-voltage detect, low-voltage warning
mbed_official 585:a1ed5b41f74f 99 DCD LLWU_IRQHandler ;Low Leakage Wakeup
mbed_official 585:a1ed5b41f74f 100 DCD I2C0_IRQHandler ;I2C0 interrupt
mbed_official 585:a1ed5b41f74f 101 DCD I2C1_IRQHandler ;I2C1 interrupt
mbed_official 585:a1ed5b41f74f 102 DCD SPI0_IRQHandler ;SPI0 single interrupt vector for all sources
mbed_official 585:a1ed5b41f74f 103 DCD SPI1_IRQHandler ;SPI1 single interrupt vector for all sources
mbed_official 585:a1ed5b41f74f 104 DCD UART0_IRQHandler ;UART0 status and error
mbed_official 585:a1ed5b41f74f 105 DCD UART1_IRQHandler ;UART1 status and error
mbed_official 585:a1ed5b41f74f 106 DCD UART2_IRQHandler ;UART2 status and error
mbed_official 585:a1ed5b41f74f 107 DCD ADC0_IRQHandler ;ADC0 interrupt
mbed_official 585:a1ed5b41f74f 108 DCD CMP0_IRQHandler ;CMP0 interrupt
mbed_official 585:a1ed5b41f74f 109 DCD TPM0_IRQHandler ;TPM0 single interrupt vector for all sources
mbed_official 585:a1ed5b41f74f 110 DCD TPM1_IRQHandler ;TPM1 single interrupt vector for all sources
mbed_official 585:a1ed5b41f74f 111 DCD TPM2_IRQHandler ;TPM2 single interrupt vector for all sources
mbed_official 585:a1ed5b41f74f 112 DCD RTC_IRQHandler ;RTC alarm interrupt
mbed_official 585:a1ed5b41f74f 113 DCD RTC_Seconds_IRQHandler ;RTC seconds interrupt
mbed_official 585:a1ed5b41f74f 114 DCD PIT_IRQHandler ;PIT single interrupt vector for all channels
mbed_official 585:a1ed5b41f74f 115 DCD I2S0_IRQHandler ;I2S0 Single interrupt vector for all sources
mbed_official 585:a1ed5b41f74f 116 DCD USB0_IRQHandler ;USB0 OTG
mbed_official 585:a1ed5b41f74f 117 DCD DAC0_IRQHandler ;DAC0 interrupt
mbed_official 585:a1ed5b41f74f 118 DCD TSI0_IRQHandler ;TSI0 interrupt
mbed_official 585:a1ed5b41f74f 119 DCD MCG_IRQHandler ;MCG interrupt
mbed_official 585:a1ed5b41f74f 120 DCD LPTMR0_IRQHandler ;LPTMR0 interrupt
mbed_official 585:a1ed5b41f74f 121 DCD Reserved45_IRQHandler ;Reserved interrupt
mbed_official 585:a1ed5b41f74f 122 DCD PORTA_IRQHandler ;PORTA pin detect
mbed_official 585:a1ed5b41f74f 123 DCD PORTC_PORTD_IRQHandler ;Single interrupt vector for PORTC and PORTD pin detect
mbed_official 585:a1ed5b41f74f 124 __Vectors_End
mbed_official 585:a1ed5b41f74f 125
mbed_official 585:a1ed5b41f74f 126 SECTION FlashConfig:CODE
mbed_official 585:a1ed5b41f74f 127 __FlashConfig
mbed_official 585:a1ed5b41f74f 128 DCD 0xFFFFFFFF
mbed_official 585:a1ed5b41f74f 129 DCD 0xFFFFFFFF
mbed_official 585:a1ed5b41f74f 130 DCD 0xFFFFFFFF
mbed_official 585:a1ed5b41f74f 131 DCD 0xFFFFFFFE
mbed_official 585:a1ed5b41f74f 132 __FlashConfig_End
mbed_official 585:a1ed5b41f74f 133
mbed_official 585:a1ed5b41f74f 134 __Vectors EQU __vector_table
mbed_official 585:a1ed5b41f74f 135 __Vectors_Size EQU __Vectors_End - __Vectors
mbed_official 585:a1ed5b41f74f 136
mbed_official 585:a1ed5b41f74f 137
mbed_official 585:a1ed5b41f74f 138 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mbed_official 585:a1ed5b41f74f 139 ;;
mbed_official 585:a1ed5b41f74f 140 ;; Default interrupt handlers.
mbed_official 585:a1ed5b41f74f 141 ;;
mbed_official 585:a1ed5b41f74f 142 THUMB
mbed_official 585:a1ed5b41f74f 143
mbed_official 585:a1ed5b41f74f 144 PUBWEAK Reset_Handler
mbed_official 585:a1ed5b41f74f 145 SECTION .text:CODE:REORDER:NOROOT(2)
mbed_official 585:a1ed5b41f74f 146 Reset_Handler
mbed_official 585:a1ed5b41f74f 147 CPSID I ; Mask interrupts
mbed_official 585:a1ed5b41f74f 148 LDR R0, =SystemInit
mbed_official 585:a1ed5b41f74f 149 BLX R0
mbed_official 585:a1ed5b41f74f 150 LDR R0, =init_data_bss
mbed_official 585:a1ed5b41f74f 151 BLX R0
mbed_official 585:a1ed5b41f74f 152 CPSIE I ; Unmask interrupts
mbed_official 585:a1ed5b41f74f 153 LDR R0, =__iar_program_start
mbed_official 585:a1ed5b41f74f 154 BX R0
mbed_official 585:a1ed5b41f74f 155
mbed_official 585:a1ed5b41f74f 156 PUBWEAK NMI_Handler
mbed_official 585:a1ed5b41f74f 157 SECTION .text:CODE:REORDER:NOROOT(1)
mbed_official 585:a1ed5b41f74f 158 NMI_Handler
mbed_official 585:a1ed5b41f74f 159 B .
mbed_official 585:a1ed5b41f74f 160
mbed_official 585:a1ed5b41f74f 161 PUBWEAK HardFault_Handler
mbed_official 585:a1ed5b41f74f 162 SECTION .text:CODE:REORDER:NOROOT(1)
mbed_official 585:a1ed5b41f74f 163 HardFault_Handler
mbed_official 585:a1ed5b41f74f 164 B .
mbed_official 585:a1ed5b41f74f 165
mbed_official 585:a1ed5b41f74f 166 PUBWEAK SVC_Handler
mbed_official 585:a1ed5b41f74f 167 SECTION .text:CODE:REORDER:NOROOT(1)
mbed_official 585:a1ed5b41f74f 168 SVC_Handler
mbed_official 585:a1ed5b41f74f 169 B .
mbed_official 585:a1ed5b41f74f 170
mbed_official 585:a1ed5b41f74f 171 PUBWEAK PendSV_Handler
mbed_official 585:a1ed5b41f74f 172 SECTION .text:CODE:REORDER:NOROOT(1)
mbed_official 585:a1ed5b41f74f 173 PendSV_Handler
mbed_official 585:a1ed5b41f74f 174 B .
mbed_official 585:a1ed5b41f74f 175
mbed_official 585:a1ed5b41f74f 176 PUBWEAK SysTick_Handler
mbed_official 585:a1ed5b41f74f 177 SECTION .text:CODE:REORDER:NOROOT(1)
mbed_official 585:a1ed5b41f74f 178 SysTick_Handler
mbed_official 585:a1ed5b41f74f 179 B .
mbed_official 585:a1ed5b41f74f 180
mbed_official 585:a1ed5b41f74f 181 PUBWEAK DMA0_IRQHandler
mbed_official 585:a1ed5b41f74f 182 PUBWEAK DMA1_IRQHandler
mbed_official 585:a1ed5b41f74f 183 PUBWEAK DMA2_IRQHandler
mbed_official 585:a1ed5b41f74f 184 PUBWEAK DMA3_IRQHandler
mbed_official 585:a1ed5b41f74f 185 PUBWEAK Reserved20_IRQHandler
mbed_official 585:a1ed5b41f74f 186 PUBWEAK FTFA_IRQHandler
mbed_official 585:a1ed5b41f74f 187 PUBWEAK LVD_LVW_IRQHandler
mbed_official 585:a1ed5b41f74f 188 PUBWEAK LLWU_IRQHandler
mbed_official 585:a1ed5b41f74f 189 PUBWEAK I2C0_IRQHandler
mbed_official 585:a1ed5b41f74f 190 PUBWEAK I2C1_IRQHandler
mbed_official 585:a1ed5b41f74f 191 PUBWEAK SPI0_IRQHandler
mbed_official 585:a1ed5b41f74f 192 PUBWEAK SPI1_IRQHandler
mbed_official 585:a1ed5b41f74f 193 PUBWEAK UART0_IRQHandler
mbed_official 585:a1ed5b41f74f 194 PUBWEAK UART1_IRQHandler
mbed_official 585:a1ed5b41f74f 195 PUBWEAK UART2_IRQHandler
mbed_official 585:a1ed5b41f74f 196 PUBWEAK ADC0_IRQHandler
mbed_official 585:a1ed5b41f74f 197 PUBWEAK CMP0_IRQHandler
mbed_official 585:a1ed5b41f74f 198 PUBWEAK TPM0_IRQHandler
mbed_official 585:a1ed5b41f74f 199 PUBWEAK TPM1_IRQHandler
mbed_official 585:a1ed5b41f74f 200 PUBWEAK TPM2_IRQHandler
mbed_official 585:a1ed5b41f74f 201 PUBWEAK RTC_IRQHandler
mbed_official 585:a1ed5b41f74f 202 PUBWEAK RTC_Seconds_IRQHandler
mbed_official 585:a1ed5b41f74f 203 PUBWEAK PIT_IRQHandler
mbed_official 585:a1ed5b41f74f 204 PUBWEAK I2S0_IRQHandler
mbed_official 585:a1ed5b41f74f 205 PUBWEAK USB0_IRQHandler
mbed_official 585:a1ed5b41f74f 206 PUBWEAK DAC0_IRQHandler
mbed_official 585:a1ed5b41f74f 207 PUBWEAK TSI0_IRQHandler
mbed_official 585:a1ed5b41f74f 208 PUBWEAK MCG_IRQHandler
mbed_official 585:a1ed5b41f74f 209 PUBWEAK LPTMR0_IRQHandler
mbed_official 585:a1ed5b41f74f 210 PUBWEAK Reserved45_IRQHandler
mbed_official 585:a1ed5b41f74f 211 PUBWEAK PORTA_IRQHandler
mbed_official 585:a1ed5b41f74f 212 PUBWEAK PORTC_PORTD_IRQHandler
mbed_official 585:a1ed5b41f74f 213 PUBWEAK DefaultISR
mbed_official 585:a1ed5b41f74f 214 SECTION .text:CODE:REORDER:NOROOT(2)
mbed_official 585:a1ed5b41f74f 215 DMA0_IRQHandler
mbed_official 585:a1ed5b41f74f 216 DMA1_IRQHandler
mbed_official 585:a1ed5b41f74f 217 DMA2_IRQHandler
mbed_official 585:a1ed5b41f74f 218 DMA3_IRQHandler
mbed_official 585:a1ed5b41f74f 219 Reserved20_IRQHandler
mbed_official 585:a1ed5b41f74f 220 FTFA_IRQHandler
mbed_official 585:a1ed5b41f74f 221 LVD_LVW_IRQHandler
mbed_official 585:a1ed5b41f74f 222 LLWU_IRQHandler
mbed_official 585:a1ed5b41f74f 223 I2C0_IRQHandler
mbed_official 585:a1ed5b41f74f 224 I2C1_IRQHandler
mbed_official 585:a1ed5b41f74f 225 SPI0_IRQHandler
mbed_official 585:a1ed5b41f74f 226 SPI1_IRQHandler
mbed_official 585:a1ed5b41f74f 227 UART0_IRQHandler
mbed_official 585:a1ed5b41f74f 228 UART1_IRQHandler
mbed_official 585:a1ed5b41f74f 229 UART2_IRQHandler
mbed_official 585:a1ed5b41f74f 230 ADC0_IRQHandler
mbed_official 585:a1ed5b41f74f 231 CMP0_IRQHandler
mbed_official 585:a1ed5b41f74f 232 TPM0_IRQHandler
mbed_official 585:a1ed5b41f74f 233 TPM1_IRQHandler
mbed_official 585:a1ed5b41f74f 234 TPM2_IRQHandler
mbed_official 585:a1ed5b41f74f 235 RTC_IRQHandler
mbed_official 585:a1ed5b41f74f 236 RTC_Seconds_IRQHandler
mbed_official 585:a1ed5b41f74f 237 PIT_IRQHandler
mbed_official 585:a1ed5b41f74f 238 I2S0_IRQHandler
mbed_official 585:a1ed5b41f74f 239 USB0_IRQHandler
mbed_official 585:a1ed5b41f74f 240 DAC0_IRQHandler
mbed_official 585:a1ed5b41f74f 241 TSI0_IRQHandler
mbed_official 585:a1ed5b41f74f 242 MCG_IRQHandler
mbed_official 585:a1ed5b41f74f 243 LPTMR0_IRQHandler
mbed_official 585:a1ed5b41f74f 244 Reserved45_IRQHandler
mbed_official 585:a1ed5b41f74f 245 PORTA_IRQHandler
mbed_official 585:a1ed5b41f74f 246 PORTC_PORTD_IRQHandler
mbed_official 585:a1ed5b41f74f 247 DefaultISR
mbed_official 585:a1ed5b41f74f 248 LDR R0, =DefaultISR
mbed_official 585:a1ed5b41f74f 249 BX R0
mbed_official 585:a1ed5b41f74f 250
mbed_official 585:a1ed5b41f74f 251 END