46 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 49 typedef volatile const uint32_t
RoReg;
51 typedef volatile uint32_t
RoReg;
53 typedef volatile uint32_t
WoReg;
54 typedef volatile uint32_t
RwReg;
132 void* pfnReset_Handler;
133 void* pfnNMI_Handler;
134 void* pfnHardFault_Handler;
135 void* pfnMemManage_Handler;
136 void* pfnBusFault_Handler;
137 void* pfnUsageFault_Handler;
138 void* pfnReserved1_Handler;
139 void* pfnReserved2_Handler;
140 void* pfnReserved3_Handler;
141 void* pfnReserved4_Handler;
142 void* pfnSVC_Handler;
143 void* pfnDebugMon_Handler;
144 void* pfnReserved5_Handler;
145 void* pfnPendSV_Handler;
146 void* pfnSysTick_Handler;
149 void* pfnSUPC_Handler;
150 void* pfnRSTC_Handler;
151 void* pfnRTC_Handler;
152 void* pfnRTT_Handler;
153 void* pfnWDT_Handler;
154 void* pfnPMC_Handler;
155 void* pfnEFC0_Handler;
156 void* pfnEFC1_Handler;
157 void* pfnUART_Handler;
158 void* pfnSMC_Handler;
159 void* pfnSDRAMC_Handler;
160 void* pfnPIOA_Handler;
161 void* pfnPIOB_Handler;
162 void* pfnPIOC_Handler;
163 void* pfnPIOD_Handler;
164 void* pfnPIOE_Handler;
165 void* pfnPIOF_Handler;
166 void* pfnUSART0_Handler;
167 void* pfnUSART1_Handler;
168 void* pfnUSART2_Handler;
169 void* pfnUSART3_Handler;
170 void* pfnHSMCI_Handler;
171 void* pfnTWI0_Handler;
172 void* pfnTWI1_Handler;
173 void* pfnSPI0_Handler;
174 void* pfnSPI1_Handler;
175 void* pfnSSC_Handler;
176 void* pfnTC0_Handler;
177 void* pfnTC1_Handler;
178 void* pfnTC2_Handler;
179 void* pfnTC3_Handler;
180 void* pfnTC4_Handler;
181 void* pfnTC5_Handler;
182 void* pfnTC6_Handler;
183 void* pfnTC7_Handler;
184 void* pfnTC8_Handler;
185 void* pfnPWM_Handler;
186 void* pfnADC_Handler;
187 void* pfnDACC_Handler;
188 void* pfnDMAC_Handler;
189 void* pfnUOTGHS_Handler;
190 void* pfnTRNG_Handler;
191 void* pfnEMAC_Handler;
192 void* pfnCAN0_Handler;
193 void* pfnCAN1_Handler;
198 void NMI_Handler (
void );
200 void MemManage_Handler (
void );
203 void SVC_Handler (
void );
204 void DebugMon_Handler (
void );
205 void PendSV_Handler (
void );
209 void ADC_Handler (
void );
210 void CAN0_Handler (
void );
211 void CAN1_Handler (
void );
212 void DACC_Handler (
void );
213 void DMAC_Handler (
void );
214 void EFC0_Handler (
void );
215 void EFC1_Handler (
void );
216 void EMAC_Handler (
void );
217 void HSMCI_Handler (
void );
218 void PIOA_Handler (
void );
219 void PIOB_Handler (
void );
220 void PIOC_Handler (
void );
221 void PIOD_Handler (
void );
222 void PIOE_Handler (
void );
223 void PIOF_Handler (
void );
224 void PMC_Handler (
void );
225 void PWM_Handler (
void );
226 void RSTC_Handler (
void );
227 void RTC_Handler (
void );
228 void RTT_Handler (
void );
229 void SDRAMC_Handler (
void );
230 void SMC_Handler (
void );
231 void SPI0_Handler (
void );
232 void SPI1_Handler (
void );
233 void SSC_Handler (
void );
234 void SUPC_Handler (
void );
235 void TC0_Handler (
void );
236 void TC1_Handler (
void );
237 void TC2_Handler (
void );
238 void TC3_Handler (
void );
239 void TC4_Handler (
void );
240 void TC5_Handler (
void );
241 void TC6_Handler (
void );
242 void TC7_Handler (
void );
243 void TC8_Handler (
void );
244 void TRNG_Handler (
void );
245 void TWI0_Handler (
void );
246 void TWI1_Handler (
void );
247 void UART_Handler (
void );
248 void UOTGHS_Handler (
void );
249 void USART0_Handler (
void );
250 void USART1_Handler (
void );
251 void USART2_Handler (
void );
252 void USART3_Handler (
void );
253 void WDT_Handler (
void );
259 #define __CM3_REV 0x0200 260 #define __MPU_PRESENT 1 261 #define __NVIC_PRIO_BITS 4 262 #define __Vendor_SysTickConfig 0 269 #if !defined DONT_USE_CMSIS_INIT 281 #include "component/component_adc.h" 282 #include "component/component_can.h" 283 #include "component/component_chipid.h" 284 #include "component/component_dacc.h" 285 #include "component/component_dmac.h" 286 #include "component/component_efc.h" 287 #include "component/component_emac.h" 288 #include "component/component_gpbr.h" 289 #include "component/component_hsmci.h" 290 #include "component/component_matrix.h" 291 #include "component/component_pdc.h" 292 #include "component/component_pio.h" 293 #include "component/component_pmc.h" 294 #include "component/component_pwm.h" 295 #include "component/component_rstc.h" 296 #include "component/component_rtc.h" 297 #include "component/component_rtt.h" 298 #include "component/component_sdramc.h" 299 #include "component/component_smc.h" 300 #include "component/component_spi.h" 301 #include "component/component_ssc.h" 302 #include "component/component_supc.h" 303 #include "component/component_tc.h" 304 #include "component/component_trng.h" 305 #include "component/component_twi.h" 306 #include "component/component_uart.h" 307 #include "component/component_uotghs.h" 308 #include "component/component_usart.h" 309 #include "component/component_wdt.h" 318 #include "instance/instance_hsmci.h" 319 #include "instance/instance_ssc.h" 320 #include "instance/instance_spi0.h" 321 #include "instance/instance_spi1.h" 322 #include "instance/instance_tc0.h" 323 #include "instance/instance_tc1.h" 324 #include "instance/instance_tc2.h" 325 #include "instance/instance_twi0.h" 326 #include "instance/instance_twi1.h" 327 #include "instance/instance_pwm.h" 328 #include "instance/instance_usart0.h" 329 #include "instance/instance_usart1.h" 330 #include "instance/instance_usart2.h" 331 #include "instance/instance_usart3.h" 332 #include "instance/instance_uotghs.h" 333 #include "instance/instance_emac.h" 334 #include "instance/instance_can0.h" 335 #include "instance/instance_can1.h" 336 #include "instance/instance_trng.h" 337 #include "instance/instance_adc.h" 338 #include "instance/instance_dmac.h" 339 #include "instance/instance_dacc.h" 340 #include "instance/instance_smc.h" 341 #include "instance/instance_sdramc.h" 342 #include "instance/instance_matrix.h" 343 #include "instance/instance_pmc.h" 344 #include "instance/instance_uart.h" 345 #include "instance/instance_chipid.h" 346 #include "instance/instance_efc0.h" 347 #include "instance/instance_efc1.h" 348 #include "instance/instance_pioa.h" 349 #include "instance/instance_piob.h" 350 #include "instance/instance_pioc.h" 351 #include "instance/instance_piod.h" 352 #include "instance/instance_pioe.h" 353 #include "instance/instance_piof.h" 354 #include "instance/instance_rstc.h" 355 #include "instance/instance_supc.h" 356 #include "instance/instance_rtt.h" 357 #include "instance/instance_wdt.h" 358 #include "instance/instance_rtc.h" 359 #include "instance/instance_gpbr.h" 378 #define ID_SDRAMC (10) 385 #define ID_USART0 (17) 386 #define ID_USART1 (18) 387 #define ID_USART2 (19) 388 #define ID_USART3 (20) 389 #define ID_HSMCI (21) 408 #define ID_UOTGHS (40) 414 #define ID_PERIPH_COUNT (45) 423 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 424 #define HSMCI (0x40000000U) 425 #define SSC (0x40004000U) 426 #define SPI0 (0x40008000U) 427 #define SPI1 (0x4000C000U) 428 #define TC0 (0x40080000U) 429 #define TC1 (0x40084000U) 430 #define TC2 (0x40088000U) 431 #define TWI0 (0x4008C000U) 432 #define PDC_TWI0 (0x4008C100U) 433 #define TWI1 (0x40090000U) 434 #define PDC_TWI1 (0x40090100U) 435 #define PWM (0x40094000U) 436 #define PDC_PWM (0x40094100U) 437 #define USART0 (0x40098000U) 438 #define PDC_USART0 (0x40098100U) 439 #define USART1 (0x4009C000U) 440 #define PDC_USART1 (0x4009C100U) 441 #define USART2 (0x400A0000U) 442 #define PDC_USART2 (0x400A0100U) 443 #define USART3 (0x400A4000U) 444 #define PDC_USART3 (0x400A4100U) 445 #define UOTGHS (0x400AC000U) 446 #define EMAC (0x400B0000U) 447 #define CAN0 (0x400B4000U) 448 #define CAN1 (0x400B8000U) 449 #define TRNG (0x400BC000U) 450 #define ADC (0x400C0000U) 451 #define PDC_ADC (0x400C0100U) 452 #define DMAC (0x400C4000U) 453 #define DACC (0x400C8000U) 454 #define PDC_DACC (0x400C8100U) 455 #define SMC (0x400E0000U) 456 #define SDRAMC (0x400E0200U) 457 #define MATRIX (0x400E0400U) 458 #define PMC (0x400E0600U) 459 #define UART (0x400E0800U) 460 #define PDC_UART (0x400E0900U) 461 #define CHIPID (0x400E0940U) 462 #define EFC0 (0x400E0A00U) 463 #define EFC1 (0x400E0C00U) 464 #define PIOA (0x400E0E00U) 465 #define PIOB (0x400E1000U) 466 #define PIOC (0x400E1200U) 467 #define PIOD (0x400E1400U) 468 #define PIOE (0x400E1600U) 469 #define PIOF (0x400E1800U) 470 #define RSTC (0x400E1A00U) 471 #define SUPC (0x400E1A10U) 472 #define RTT (0x400E1A30U) 473 #define WDT (0x400E1A50U) 474 #define RTC (0x400E1A60U) 475 #define GPBR (0x400E1A90U) 477 #define HSMCI ((Hsmci *)0x40000000U) 478 #define SSC ((Ssc *)0x40004000U) 479 #define SPI0 ((Spi *)0x40008000U) 480 #define SPI1 ((Spi *)0x4000C000U) 481 #define TC0 ((Tc *)0x40080000U) 482 #define TC1 ((Tc *)0x40084000U) 483 #define TC2 ((Tc *)0x40088000U) 484 #define TWI0 ((Twi *)0x4008C000U) 485 #define PDC_TWI0 ((Pdc *)0x4008C100U) 486 #define TWI1 ((Twi *)0x40090000U) 487 #define PDC_TWI1 ((Pdc *)0x40090100U) 488 #define PWM ((Pwm *)0x40094000U) 489 #define PDC_PWM ((Pdc *)0x40094100U) 490 #define USART0 ((Usart *)0x40098000U) 491 #define PDC_USART0 ((Pdc *)0x40098100U) 492 #define USART1 ((Usart *)0x4009C000U) 493 #define PDC_USART1 ((Pdc *)0x4009C100U) 494 #define USART2 ((Usart *)0x400A0000U) 495 #define PDC_USART2 ((Pdc *)0x400A0100U) 496 #define USART3 ((Usart *)0x400A4000U) 497 #define PDC_USART3 ((Pdc *)0x400A4100U) 498 #define UOTGHS ((Uotghs *)0x400AC000U) 499 #define EMAC ((Emac *)0x400B0000U) 500 #define CAN0 ((Can *)0x400B4000U) 501 #define CAN1 ((Can *)0x400B8000U) 502 #define TRNG ((Trng *)0x400BC000U) 503 #define ADC ((Adc *)0x400C0000U) 504 #define PDC_ADC ((Pdc *)0x400C0100U) 505 #define DMAC ((Dmac *)0x400C4000U) 506 #define DACC ((Dacc *)0x400C8000U) 507 #define PDC_DACC ((Pdc *)0x400C8100U) 508 #define SMC ((Smc *)0x400E0000U) 509 #define SDRAMC ((Sdramc *)0x400E0200U) 510 #define MATRIX ((Matrix *)0x400E0400U) 511 #define PMC ((Pmc *)0x400E0600U) 512 #define UART ((Uart *)0x400E0800U) 513 #define PDC_UART ((Pdc *)0x400E0900U) 514 #define CHIPID ((Chipid *)0x400E0940U) 515 #define EFC0 ((Efc *)0x400E0A00U) 516 #define EFC1 ((Efc *)0x400E0C00U) 517 #define PIOA ((Pio *)0x400E0E00U) 518 #define PIOB ((Pio *)0x400E1000U) 519 #define PIOC ((Pio *)0x400E1200U) 520 #define PIOD ((Pio *)0x400E1400U) 521 #define PIOE ((Pio *)0x400E1600U) 522 #define PIOF ((Pio *)0x400E1800U) 523 #define RSTC ((Rstc *)0x400E1A00U) 524 #define SUPC ((Supc *)0x400E1A10U) 525 #define RTT ((Rtt *)0x400E1A30U) 526 #define WDT ((Wdt *)0x400E1A50U) 527 #define RTC ((Rtc *)0x400E1A60U) 528 #define GPBR ((Gpbr *)0x400E1A90U) 538 #include "pio/pio_sam3x8h.h" 545 #define IFLASH0_SIZE (0x40000u) 546 #define IFLASH0_PAGE_SIZE (256u) 547 #define IFLASH0_LOCK_REGION_SIZE (16384u) 548 #define IFLASH0_NB_OF_PAGES (1024u) 549 #define IFLASH1_SIZE (0x40000u) 550 #define IFLASH1_PAGE_SIZE (256u) 551 #define IFLASH1_LOCK_REGION_SIZE (16384u) 552 #define IFLASH1_NB_OF_PAGES (1024u) 553 #define IRAM0_SIZE (0x10000u) 554 #define IRAM1_SIZE (0x8000u) 555 #define NFCRAM_SIZE (0x1000u) 556 #define IFLASH_SIZE (IFLASH0_SIZE+IFLASH1_SIZE) 557 #define IRAM_SIZE (IRAM0_SIZE+IRAM1_SIZE) 559 #define IFLASH0_ADDR (0x00080000u) 560 #if defined IFLASH0_SIZE 561 #define IFLASH1_ADDR (IFLASH0_ADDR+IFLASH0_SIZE) 563 #define IROM_ADDR (0x00100000u) 564 #define IRAM0_ADDR (0x20000000u) 565 #define IRAM1_ADDR (0x20080000u) 566 #define NFC_RAM_ADDR (0x20100000u) 567 #define UOTGHS_RAM_ADDR (0x20180000u) 568 #define EBI_CS0_ADDR (0x60000000u) 569 #define EBI_CS1_ADDR (0x61000000u) 570 #define EBI_CS2_ADDR (0x62000000u) 571 #define EBI_CS3_ADDR (0x63000000u) 572 #define EBI_CS4_ADDR (0x64000000u) 573 #define EBI_CS5_ADDR (0x65000000u) 574 #define EBI_CS6_ADDR (0x66000000u) 575 #define EBI_CS7_ADDR (0x67000000u) 582 #define CHIP_FREQ_SLCK_RC_MIN (20000UL) 583 #define CHIP_FREQ_SLCK_RC (32000UL) 584 #define CHIP_FREQ_SLCK_RC_MAX (44000UL) 585 #define CHIP_FREQ_MAINCK_RC_4MHZ (4000000UL) 586 #define CHIP_FREQ_MAINCK_RC_8MHZ (8000000UL) 587 #define CHIP_FREQ_MAINCK_RC_12MHZ (12000000UL) 588 #define CHIP_FREQ_CPU_MAX (84000000UL) 589 #define CHIP_FREQ_XTAL_32K (32768UL) 590 #define CHIP_FREQ_XTAL_12M (12000000UL) 593 #define CHIP_FLASH_WRITE_WAIT_STATE (6U) 596 #define CHIP_FREQ_FWS_0 (22500000UL) 597 #define CHIP_FREQ_FWS_1 (34000000UL) 598 #define CHIP_FREQ_FWS_2 (53000000UL) 599 #define CHIP_FREQ_FWS_3 (78000000UL)
void HardFault_Handler(void)
Definition: FreeRTOS_ARM.c:99
Definition: sam3x8h.h:117
Definition: sam3x8h.h:112
Definition: sam3x8h.h:110
Definition: sam3x8h.h:115
Definition: sam3x8h.h:118
Definition: sam3n00a.h:102
Definition: sam3x8h.h:104
Definition: sam3x8h.h:100
IRQn
Definition: ARMCM0.h:35
Definition: sam3x8h.h:111
Definition: sam3x8h.h:119
CMSIS Cortex-M3 Core Peripheral Access Layer Header File.
CMSIS Cortex-M# Device Peripheral Access Layer Header File for SAM3 devices.
void UsageFault_Handler(void)
Definition: FreeRTOS_ARM.c:109
void SysTick_Handler(void)
SysTick_Handler.
Definition: main.c:78
Definition: sam3x8h.h:114
Definition: sam3x8h.h:106
void BusFault_Handler(void)
Definition: FreeRTOS_ARM.c:104
Definition: sam3x8h.h:101
Definition: sam3x8h.h:102
Definition: sam3x8h.h:105
volatile uint32_t RwReg
Definition: sam3x8h.h:54
Definition: sam3x8h.h:108
void Reset_Handler(void)
This is the code that gets called on processor reset. To initialize the device, and call the main() r...
Definition: startup_sam3n.c:172
volatile uint32_t WoReg
Definition: sam3x8h.h:53
volatile const uint32_t RoReg
Definition: sam3x8h.h:49
Definition: sam3x8h.h:107
Definition: sam3x8h.h:109
Definition: sam3x8h.h:113
Definition: sam3x8h.h:120
Definition: sam3x8h.h:103
Definition: sam3x8h.h:121
Definition: sam3x8h.h:116
Definition: sam3x8h.h:123