Commit 25afe388 authored by Martin Vítek's avatar Martin Vítek

New project with UART class

parent e67447bf
:1000000050080020ED000000C1010000C101000007
:1000100000000000000000000000000000000000E0
:10002000000000000000000000000000C10100000E
:100030000000000000000000C1010000C10100003C
:10004000C1010000C1010000C1010000C1010000A8
:10005000C1010000C1010000C1010000000000005A
:10006000C1010000C1010000C1010000C101000088
:10007000C1010000C1010000C1010000C101000078
:10008000C1010000C1010000C101000010B5064C13
:100090002378002B07D1054B002B02D0044800E049
:1000A00000BF0123237010BD3004002000000000B9
:1000B0008C070000084B10B5002B03D007490848F7
:1000C00000E000BF07480368002B00D110BD064BBD
:1000D000002BFBD09847F9E7000000003404002013
:1000E0008C0700008C0700000000000080B582B083
:1000F00000AF274B7B60274B3B607A683B689A4296
:100100000CD007E03B681A1D3A607A68111D7960CF
:1001100012681A603A68204B9A42F3D31F4B3B6037
:1001200004E03B681A1D3A6000221A603A681C4BD2
:100130009A42F6D31B4B7B601B4B7A68FF218A43A4
:100140009A601A4A90235B000221D150184A937B8F
:1001500030218B43191C20230B439373144A937B48
:100160000C218B43191C08230B439373104A937B78
:1001700003218B43191C02230B4393730D4A5368CD
:1001800080210B4353600C4B98470C4B9847FEE77C
:100190008C07000000000020300400203004002004
:1001A0004C0400200000000000ED00E00070004161
:1001B0000048004100400041ED050000310500000D
:1001C00080B500AFFEE7000080B500AF024B034AE8
:1001D0001A60C046BD4680BD0000002040420F00AE
:1001E00080B584B000AFF860B960FB1D1A70FB6881
:1001F000BA681A60FB68FA1D12781A71FB1D1B7829
:10020000BA684021D3185B1800221A70FB1D1B78B6
:1002100001229A40BB689A60FB1D1B7801229A401C
:10022000BB685A61FB681800BD4604B080BD90B53C
:1002300083B000AF786039603B68413317D17B6889
:100240001A687B681B791C007B681B6879680979D0
:10025000080040211B185B181B78DBB240218B4340
:10026000D8B2402113195B18021C1A7016E07B6883
:100270001A687B681B791C007B681B6879680979A0
:10028000080040211B185B181B78DBB240210B4390
:10029000D8B2402113195B18021C1A70C046BD4623
:1002A00003B090BD80B582B000AF78607B681B68FA
:1002B0007A681279110001228A409A61C046BD46CF
:1002C00002B080BD80B582B000AF78607B681B68EB
:1002D0007A681279110001228A405A61C046BD46EF
:1002E00002B080BD80B584B000AFF860B96019007D
:1002F000FB1D1A70BB1D0A1C1A70FB68BA681A60D5
:10030000FB68FA1D12781A71FB68BA1D12785A71CF
:10031000FB1D1B7801229A40BB685A60FB1D1B78AD
:10032000FA1D1278B96840208A1812181278D2B2D1
:1003300002210A43D0B2BA684021D3185B18021CCC
:100340001A70FB681800BD4604B080BD80B582B04D
:1003500000AF78607B681B687A681279110001220F
:100360008A409A617B681B687A6812791100402282
:100370005B189B1806221A70C046BD4602B080BDAD
:1003800080B582B000AF78607B685B79002B0BD0C2
:100390007B681B681B6A7A681279D340012213407C
:1003A0005A425341DBB20AE07B681B681B6A7A68D9
:1003B0001279D340012213405A1E9341DBB2180038
:1003C000BD4602B080BD80B582B000AF78607B686A
:1003D0001800BD4602B080BD80B582B000AF786025
:1003E0003D4B8022D2009A603B4B802212015A6022
:1003F00039494A228B5C012003438B54364A4B23F4
:100400000321D154344A35232221D154324A302396
:100410002221D154304A31232221D1542E4A322371
:100420002221D1542C4A33232221D1542A4A342365
:100430002221D154284A36232221D154264A372357
:100440002221D154244A38232221D154224A39234B
:100450002221D154204A3A232221D1541E4A3B233F
:100460002221D1541C4A3C232221D1541A4A3D2333
:100470002221D154184A3E232221D154164A3F2327
:100480002221D154154A136A04210B431362144BE1
:1004900005229A60124B134A5A60114B124A5A8035
:1004A000124B134A1A60114BC02292025A600F4B32
:1004B000EC2252429A810D4A136802210B431360C9
:1004C0000A4BDB699B07DB0FDBB2002B00D0F7E7A1
:1004D000C046BD4602B080BD00440041000400405B
:1004E000000C0040050601000E4500000008004217
:1004F0000480310080B582B000AF78600A00FB1C38
:100500001A700A4B1B7EDB07DB0FDBB20122534064
:10051000DBB2002B00D0F4E7044AFB1C1B789BB233
:100520001385C046BD4602B080BDC04600080042EB
:1005300090B587B000AF204B984720490C23FB189B
:10054000092218001E4B98471C49381D0123192207
:100550001C4CA0473B0018001B4B98470C23FB1872
:1005600040211800194B98473B1D1800184B98471D
:100570003B001800174B98473B1D1800164B984737
:10058000031E05D00C23FB181800144B984704E0F9
:100590000C23FB181800124B98473B0061211800F0
:1005A000104B984700237B617B690F4A9342E3DC41
:1005B0007B6901337B61F7E7C9010000004400411A
:1005C000E1010000E5020000C70300002F02000067
:1005D0004D030000D903000081030000A5020000C4
:1005E000C5020000F50400008713000070B50D4E31
:1005F0000D4D0024AD1BAD1005D0A300F358013400
:100600009847A542F9D100F0AFF8084E084D0024F4
:10061000AD1BAD1005D0A300F35801349847A54297
:10062000F9D170BD74070000740700007407000062
:100630007C070000034B10B5002B02D0024800F0ED
:1006400005F810BD000000005D06000010B50100B7
:1006500000230022002000F01BF810BD70B5094BEC
:10066000094CE41AA41009D0084AA518AD00ED18E9
:100670002B68013C9847043D002CF9D100F07EF82E
:1006800070BDC046880700008C070000FFFFFF3FD9
:10069000F8B5DE469B46314B45461C68A4234E46C2
:1006A00057465B00E0B50500E0580E009046002874
:1006B0004BD043681F2B0DDC5C1C002D21D1023375
:1006C0009B0044601E5000203CBC90469946A246C8
:1006D000AB46F8BD224B002B3CD0C820400000E0C8
:1006E00000BF002836D0A42200235200A158436046
:1006F0000160A05040328350043283500124002D09
:10070000DDD09A0091468144424688214F467A5076
:10071000C42252009046804442468739994012686C
:100720008A460A43944642466146116084224946FD
:100730005F4652008F50022DC1D1020055468D32C6
:10074000FF3211680D431560B9E720004D30FF30CE
:10075000E050AEE701204042B6E7C0466407000023
:100760000000000008000020F8B5C046F8BC08BC36
:100770009E46704735060000B5000000F8B5C0463B
:0C078000F8BC08BC9E4670478D000000CD
:10078C0040420F000000000000000000F4020020B6
:10079C005C030020C40300200000000000000000E7
:1007AC00000000000000000000000000000000003D
:1007BC00000000000000000000000000000000002D
:1007CC00000000000000000000000000000000001D
:1007DC00000000000000000000000000000000000D
:1007EC0000000000000000000000000000000000FD
:1007FC0000000000000000000000000000000000ED
:10080C0000000000000000000000000000000000DC
:10081C0000000000000000000000000000000000CC
:10082C0000000000000000000000000000000000BC
:10083C0001000000000000000E33CDAB34126DE659
:10084C00ECDE05000B0000000000000000000000C2
:10085C00000000000000000000000000000000008C
:10086C00000000000000000000000000000000007C
:10087C00000000000000000000000000000000006C
:10088C00000000000000000000000000000000005C
:10089C00000000000000000000000000000000004C
:1008AC00000000000000000000000000000000003C
:1008BC00000000000000000000000000000000002C
:1008CC00000000000000000000000000000000001C
:1008DC00000000000000000000000000000000000C
:1008EC0000000000000000000000000000000000FC
:1008FC0000000000000000000000000000000000EC
:10090C0000000000000000000000000000000000DB
:10091C0000000000000000000000000000000000CB
:10092C0000000000000000000000000000000000BB
:10093C0000000000000000000000000000000000AB
:10094C00000000000000000000000000000000009B
:10095C00000000000000000000000000000000008B
:10096C00000000000000000000000000000000007B
:10097C00000000000000000000000000000000006B
:10098C00000000000000000000000000000000005B
:10099C00000000000000000000000000000000004B
:1009AC00000000000000000000000000000000003B
:1009BC00000000000000000000000000000000002B
:1009CC00000000000000000000000000000000001B
:1009DC00000000000000000000000000000000000B
:1009EC0000000000000000000000000000000000FB
:1009FC0000000000000000000000000000000000EB
:100A0C0000000000000000000000000000000000DA
:100A1C0000000000000000000000000000000000CA
:100A2C0000000000000000000000000000000000BA
:100A3C0000000000000000000000000000000000AA
:100A4C00000000000000000000000000000000009A
:100A5C00000000000000000000000000000000008A
:100A6C00000000000000000000000000000000007A
:100A7C00000000000000000000000000000000006A
:100A8C00000000000000000000000000000000005A
:100A9C00000000000000000000000000000000004A
:100AAC00000000000000000000000000000000003A
:100ABC00000000000000000000000000000000002A
:100ACC00000000000000000000000000000000001A
:100ADC00000000000000000000000000000000000A
:100AEC0000000000000000000000000000000000FA
:100AFC0000000000000000000000000000000000EA
:100B0C0000000000000000000000000000000000D9
:100B1C0000000000000000000000000000000000C9
:100B2C0000000000000000000000000000000000B9
:100B3C0000000000000000000000000000000000A9
:100B4C000000000000000000000000000000000099
:100B5C000000000000000000000000000000000089
:100B6C000000000000000000000000000000000079
:100B7C000000000000000000000000000000000069
:100B8C000000000000000000000000000000000059
:100B9C000000000000000000000000000000000049
:100BAC000000000000000000000000000000000039
:00000001FF
/**
* \file
*
* \brief Linker script for running in internal FLASH on the SAMD10D14AM
*
* Copyright (c) 2016 Atmel Corporation,
* a wholly owned subsidiary of Microchip Technology Inc.
*
* \asf_license_start
*
* \page License
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licence at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* \asf_license_stop
*
*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
SEARCH_DIR(.)
/* Memory Spaces Definitions */
MEMORY
{
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00004000
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000
}
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : DEFINED(__stack_size__) ? __stack_size__ : 0x400;
/* Section Definitions */
SECTIONS
{
.text :
{
. = ALIGN(4);
_sfixed = .;
KEEP(*(.vectors .vectors.*))
*(.text .text.* .gnu.linkonce.t.*)
*(.glue_7t) *(.glue_7)
*(.rodata .rodata* .gnu.linkonce.r.*)
*(.ARM.extab* .gnu.linkonce.armextab.*)
/* Support C constructors, and C destructors in both user code
and the C library. This also provides support for C++ code. */
. = ALIGN(4);
KEEP(*(.init))
. = ALIGN(4);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
. = ALIGN(4);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
. = ALIGN(4);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
. = ALIGN(4);
KEEP(*(.fini))
. = ALIGN(4);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
__fini_array_end = .;
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
. = ALIGN(4);
_efixed = .; /* End of text section */
} > rom
/* .ARM.exidx is sorted, so has to go in its own output section. */
PROVIDE_HIDDEN (__exidx_start = .);
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > rom
PROVIDE_HIDDEN (__exidx_end = .);
. = ALIGN(4);
_etext = .;
.relocate : AT (_etext)
{
. = ALIGN(4);
_srelocate = .;
*(.ramfunc .ramfunc.*);
*(.data .data.*);
. = ALIGN(4);
_erelocate = .;
} > ram
/* .bss section which is used for uninitialized data */
.bss (NOLOAD) :
{
. = ALIGN(4);
_sbss = . ;
_szero = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
_ebss = . ;
_ezero = .;
} > ram
/* stack section */
.stack (NOLOAD):
{
. = ALIGN(8);
_sstack = .;
. = . + STACK_SIZE;
. = ALIGN(8);
_estack = .;
} > ram
. = ALIGN(4);
_end = . ;
}
/**
* \file
*
* \brief Linker script for running in internal SRAM on the SAMD10D14AM
*
* Copyright (c) 2016 Atmel Corporation,
* a wholly owned subsidiary of Microchip Technology Inc.
*
* \asf_license_start
*
* \page License
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licence at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* \asf_license_stop
*
*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
SEARCH_DIR(.)
/* Memory Spaces Definitions */
MEMORY
{
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000
}
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : DEFINED(__stack_size__) ? __stack_size__ : 0x400;
/* Section Definitions */
SECTIONS
{
.text :
{
. = ALIGN(4);
_sfixed = .;
KEEP(*(.vectors .vectors.*))
*(.text .text.* .gnu.linkonce.t.*)
*(.glue_7t) *(.glue_7)
*(.rodata .rodata* .gnu.linkonce.r.*)
*(.ARM.extab* .gnu.linkonce.armextab.*)
/* Support C constructors, and C destructors in both user code
and the C library. This also provides support for C++ code. */
. = ALIGN(4);
KEEP(*(.init))
. = ALIGN(4);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
. = ALIGN(4);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
. = ALIGN(4);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
. = ALIGN(4);
KEEP(*(.fini))
. = ALIGN(4);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
__fini_array_end = .;
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
. = ALIGN(4);
_efixed = .; /* End of text section */
} > ram
/* .ARM.exidx is sorted, so has to go in its own output section. */
PROVIDE_HIDDEN (__exidx_start = .);
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > ram
PROVIDE_HIDDEN (__exidx_end = .);
. = ALIGN(4);
_etext = .;
.relocate : AT (_etext)
{
. = ALIGN(4);
_srelocate = .;
*(.ramfunc .ramfunc.*);
*(.data .data.*);
. = ALIGN(4);
_erelocate = .;
} > ram
/* .bss section which is used for uninitialized data */
.bss (NOLOAD) :
{
. = ALIGN(4);
_sbss = . ;
_szero = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
_ebss = . ;
_ezero = .;
} > ram
/* stack section */
.stack (NOLOAD):
{
. = ALIGN(8);
_sstack = .;
. = . + STACK_SIZE;
. = ALIGN(8);
_estack = .;
} > ram
. = ALIGN(4);
_end = . ;
}
/**
* \file
*
* \brief gcc starttup file for SAMD10
*
* Copyright (c) 2016 Atmel Corporation,
* a wholly owned subsidiary of Microchip Technology Inc.
*
* \asf_license_start
*
* \page License
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licence at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* \asf_license_stop
*
*/
#include "samd10.h"
/* Initialize segments */
extern uint32_t _sfixed;
extern uint32_t _efixed;
extern uint32_t _etext;
extern uint32_t _srelocate;
extern uint32_t _erelocate;
extern uint32_t _szero;
extern uint32_t _ezero;
extern uint32_t _sstack;
extern uint32_t _estack;
/** \cond DOXYGEN_SHOULD_SKIP_THIS */
int main(void);
/** \endcond */
void __libc_init_array(void);
/* Default empty handler */
void Dummy_Handler(void);
/* Cortex-M0+ core handlers */
void NMI_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void HardFault_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void SVC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void PendSV_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void SysTick_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
/* Peripherals handlers */
void PM_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void SYSCTRL_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void WDT_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void RTC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void EIC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void NVMCTRL_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void DMAC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
#ifdef ID_USB
void USB_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
#endif
void EVSYS_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void SERCOM0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void SERCOM1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
#ifdef ID_SERCOM2
void SERCOM2_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
#endif
void TCC0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void TC1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void TC2_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void ADC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
void AC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
#ifdef ID_DAC
void DAC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
#endif
void PTC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
/* Exception Table */
__attribute__ ((section(".vectors")))
const DeviceVectors exception_table = {
/* Configure Initial Stack Pointer, using linker-generated symbols */
.pvStack = (void*) (&_estack),
.pfnReset_Handler = (void*) Reset_Handler,
.pfnNMI_Handler = (void*) NMI_Handler,
.pfnHardFault_Handler = (void*) HardFault_Handler,
.pvReservedM12 = (void*) (0UL), /* Reserved */
.pvReservedM11 = (void*) (0UL), /* Reserved */
.pvReservedM10 = (void*) (0UL), /* Reserved */
.pvReservedM9 = (void*) (0UL), /* Reserved */
.pvReservedM8 = (void*) (0UL), /* Reserved */
.pvReservedM7 = (void*) (0UL), /* Reserved */
.pvReservedM6 = (void*) (0UL), /* Reserved */
.pfnSVC_Handler = (void*) SVC_Handler,
.pvReservedM4 = (void*) (0UL), /* Reserved */
.pvReservedM3 = (void*) (0UL), /* Reserved */
.pfnPendSV_Handler = (void*) PendSV_Handler,
.pfnSysTick_Handler = (void*) SysTick_Handler,
/* Configurable interrupts */
.pfnPM_Handler = (void*) PM_Handler, /* 0 Power Manager */
.pfnSYSCTRL_Handler = (void*) SYSCTRL_Handler, /* 1 System Control */
.pfnWDT_Handler = (void*) WDT_Handler, /* 2 Watchdog Timer */
.pfnRTC_Handler = (void*) RTC_Handler, /* 3 Real-Time Counter */
.pfnEIC_Handler = (void*) EIC_Handler, /* 4 External Interrupt Controller */
.pfnNVMCTRL_Handler = (void*) NVMCTRL_Handler, /* 5 Non-Volatile Memory Controller */
.pfnDMAC_Handler = (void*) DMAC_Handler, /* 6 Direct Memory Access Controller */
#ifdef ID_USB
.pfnUSB_Handler = (void*) USB_Handler, /* 7 Universal Serial Bus */
#else
.pvReserved7 = (void*) (0UL), /* 7 Reserved */
#endif
.pfnEVSYS_Handler = (void*) EVSYS_Handler, /* 8 Event System Interface */
.pfnSERCOM0_Handler = (void*) SERCOM0_Handler, /* 9 Serial Communication Interface 0 */
.pfnSERCOM1_Handler = (void*) SERCOM1_Handler, /* 10 Serial Communication Interface 1 */
#ifdef ID_SERCOM2
.pfnSERCOM2_Handler = (void*) SERCOM2_Handler, /* 11 Serial Communication Interface 2 */
#else
.pvReserved11 = (void*) (0UL), /* 11 Reserved */
#endif
.pfnTCC0_Handler = (void*) TCC0_Handler, /* 12 Timer Counter Control */
.pfnTC1_Handler = (void*) TC1_Handler, /* 13 Basic Timer Counter 0 */
.pfnTC2_Handler = (void*) TC2_Handler, /* 14 Basic Timer Counter 1 */
.pfnADC_Handler = (void*) ADC_Handler, /* 15 Analog Digital Converter */
.pfnAC_Handler = (void*) AC_Handler, /* 16 Analog Comparators */
#ifdef ID_DAC
.pfnDAC_Handler = (void*) DAC_Handler, /* 17 Digital Analog Converter */
#else
.pvReserved17 = (void*) (0UL), /* 17 Reserved */
#endif
.pfnPTC_Handler = (void*) PTC_Handler /* 18 Peripheral Touch Controller */
};
/**
* \brief This is the code that gets called on processor reset.
* To initialize the device, and call the main() routine.
*/
void Reset_Handler(void)
{
uint32_t *pSrc, *pDest;
/* Initialize the relocate segment */
pSrc = &_etext;
pDest = &_srelocate;
if (pSrc != pDest) {
for (; pDest < &_erelocate;) {
*pDest++ = *pSrc++;
}
}
/* Clear the zero segment */
for (pDest = &_szero; pDest < &_ezero;) {
*pDest++ = 0;
}
/* Set the vector table base address */
pSrc = (uint32_t *) & _sfixed;
SCB->VTOR = ((uint32_t) pSrc & SCB_VTOR_TBLOFF_Msk);
/* Change default QOS values to have the best performance and correct USB behaviour */
SBMATRIX->SFR[SBMATRIX_SLAVE_HMCRAMC0].reg = 2;
#if defined(ID_USB)
USB->DEVICE.QOSCTRL.bit.CQOS = 2;
USB->DEVICE.QOSCTRL.bit.DQOS = 2;
#endif
DMAC->QOSCTRL.bit.DQOS = 2;
DMAC->QOSCTRL.bit.FQOS = 2;
DMAC->QOSCTRL.bit.WRBQOS = 2;
/* Overwriting the default value of the NVMCTRL.CTRLB.MANW bit (errata reference 13134) */
NVMCTRL->CTRLB.bit.MANW = 1;
/* Initialize the C library */
__libc_init_array();
/* Branch to main function */
main();
/* Infinite loop */
while (1);
}
/**
* \brief Default interrupt handler for unused IRQs.
*/
void Dummy_Handler(void)
{
while (1) {
}
}
/**
* \file
*
* \brief Low-level initialization functions called upon chip startup.
*
* Copyright (c) 2016 Atmel Corporation,
* a wholly owned subsidiary of Microchip Technology Inc.
*
* \asf_license_start
*
* \page License
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licence at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* \asf_license_stop
*
*/
#include "samd10.h"
/**
* Initial system clock frequency. The System RC Oscillator (RCSYS) provides
* the source for the main clock at chip startup.
*/
#define __SYSTEM_CLOCK (1000000)
uint32_t SystemCoreClock = __SYSTEM_CLOCK;/*!< System Clock Frequency (Core Clock)*/
/**
* Initialize the system
*
* @brief Setup the microcontroller system.
* Initialize the System and update the SystemCoreClock variable.
*/
void SystemInit(void)
{
// Keep the default device state after reset
SystemCoreClock = __SYSTEM_CLOCK;
return;
}
/**
* Update SystemCoreClock variable
*
* @brief Updates the SystemCoreClock with current core Clock
* retrieved from cpu registers.
*/
void SystemCoreClockUpdate(void)
{
// Not implemented
SystemCoreClock = __SYSTEM_CLOCK;
return;
}