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;
119 void* pfnReset_Handler;
120 void* pfnNMI_Handler;
121 void* pfnHardFault_Handler;
122 void* pfnMemManage_Handler;
123 void* pfnBusFault_Handler;
124 void* pfnUsageFault_Handler;
125 void* pfnReserved1_Handler;
126 void* pfnReserved2_Handler;
127 void* pfnReserved3_Handler;
128 void* pfnReserved4_Handler;
129 void* pfnSVC_Handler;
130 void* pfnDebugMon_Handler;
131 void* pfnReserved5_Handler;
132 void* pfnPendSV_Handler;
133 void* pfnSysTick_Handler;
136 void* pfnSUPC_Handler;
137 void* pfnRSTC_Handler;
138 void* pfnRTC_Handler;
139 void* pfnRTT_Handler;
140 void* pfnWDT_Handler;
141 void* pfnPMC_Handler;
142 void* pfnEFC_Handler;
144 void* pfnUART0_Handler;
145 void* pfnUART1_Handler;
146 void* pfnSMC_Handler;
147 void* pfnPIOA_Handler;
148 void* pfnPIOB_Handler;
149 void* pfnPIOC_Handler;
150 void* pfnUSART0_Handler;
151 void* pfnUSART1_Handler;
154 void* pfnHSMCI_Handler;
155 void* pfnTWI0_Handler;
156 void* pfnTWI1_Handler;
157 void* pfnSPI_Handler;
158 void* pfnSSC_Handler;
159 void* pfnTC0_Handler;
160 void* pfnTC1_Handler;
161 void* pfnTC2_Handler;
162 void* pfnTC3_Handler;
163 void* pfnTC4_Handler;
164 void* pfnTC5_Handler;
165 void* pfnADC_Handler;
166 void* pfnDACC_Handler;
167 void* pfnPWM_Handler;
168 void* pfnCRCCU_Handler;
169 void* pfnACC_Handler;
170 void* pfnUDP_Handler;
175 void NMI_Handler (
void );
177 void MemManage_Handler (
void );
180 void SVC_Handler (
void );
181 void DebugMon_Handler (
void );
182 void PendSV_Handler (
void );
186 void ACC_Handler (
void );
187 void ADC_Handler (
void );
188 void CRCCU_Handler (
void );
189 void DACC_Handler (
void );
190 void EFC_Handler (
void );
191 void HSMCI_Handler (
void );
192 void PIOA_Handler (
void );
193 void PIOB_Handler (
void );
194 void PIOC_Handler (
void );
195 void PMC_Handler (
void );
196 void PWM_Handler (
void );
197 void RSTC_Handler (
void );
198 void RTC_Handler (
void );
199 void RTT_Handler (
void );
200 void SMC_Handler (
void );
201 void SPI_Handler (
void );
202 void SSC_Handler (
void );
203 void SUPC_Handler (
void );
204 void TC0_Handler (
void );
205 void TC1_Handler (
void );
206 void TC2_Handler (
void );
207 void TC3_Handler (
void );
208 void TC4_Handler (
void );
209 void TC5_Handler (
void );
210 void TWI0_Handler (
void );
211 void TWI1_Handler (
void );
212 void UART0_Handler (
void );
213 void UART1_Handler (
void );
214 void UDP_Handler (
void );
215 void USART0_Handler (
void );
216 void USART1_Handler (
void );
217 void WDT_Handler (
void );
223 #define __CM3_REV 0x0200 224 #define __MPU_PRESENT 1 225 #define __NVIC_PRIO_BITS 4 226 #define __Vendor_SysTickConfig 0 233 #if !defined DONT_USE_CMSIS_INIT 245 #include "component/component_acc.h" 246 #include "component/component_adc.h" 247 #include "component/component_chipid.h" 248 #include "component/component_crccu.h" 249 #include "component/component_dacc.h" 250 #include "component/component_efc.h" 251 #include "component/component_gpbr.h" 252 #include "component/component_hsmci.h" 253 #include "component/component_matrix.h" 254 #include "component/component_pdc.h" 255 #include "component/component_pio.h" 256 #include "component/component_pmc.h" 257 #include "component/component_pwm.h" 258 #include "component/component_rstc.h" 259 #include "component/component_rtc.h" 260 #include "component/component_rtt.h" 261 #include "component/component_smc.h" 262 #include "component/component_spi.h" 263 #include "component/component_ssc.h" 264 #include "component/component_supc.h" 265 #include "component/component_tc.h" 266 #include "component/component_twi.h" 267 #include "component/component_uart.h" 268 #include "component/component_udp.h" 269 #include "component/component_usart.h" 270 #include "component/component_wdt.h" 279 #include "instance/instance_hsmci.h" 280 #include "instance/instance_ssc.h" 281 #include "instance/instance_spi.h" 282 #include "instance/instance_tc0.h" 283 #include "instance/instance_tc1.h" 284 #include "instance/instance_twi0.h" 285 #include "instance/instance_twi1.h" 286 #include "instance/instance_pwm.h" 287 #include "instance/instance_usart0.h" 288 #include "instance/instance_usart1.h" 289 #include "instance/instance_udp.h" 290 #include "instance/instance_adc.h" 291 #include "instance/instance_dacc.h" 292 #include "instance/instance_acc.h" 293 #include "instance/instance_crccu.h" 294 #include "instance/instance_smc.h" 295 #include "instance/instance_matrix.h" 296 #include "instance/instance_pmc.h" 297 #include "instance/instance_uart0.h" 298 #include "instance/instance_chipid.h" 299 #include "instance/instance_uart1.h" 300 #include "instance/instance_efc.h" 301 #include "instance/instance_pioa.h" 302 #include "instance/instance_piob.h" 303 #include "instance/instance_pioc.h" 304 #include "instance/instance_rstc.h" 305 #include "instance/instance_supc.h" 306 #include "instance/instance_rtt.h" 307 #include "instance/instance_wdt.h" 308 #include "instance/instance_rtc.h" 309 #include "instance/instance_gpbr.h" 325 #define ID_UART0 ( 8) 326 #define ID_UART1 ( 9) 331 #define ID_USART0 (14) 332 #define ID_USART1 (15) 333 #define ID_HSMCI (18) 347 #define ID_CRCCU (32) 351 #define ID_PERIPH_COUNT (35) 360 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 361 #define HSMCI (0x40000000U) 362 #define PDC_HSMCI (0x40000100U) 363 #define SSC (0x40004000U) 364 #define PDC_SSC (0x40004100U) 365 #define SPI (0x40008000U) 366 #define PDC_SPI (0x40008100U) 367 #define TC0 (0x40010000U) 368 #define TC1 (0x40014000U) 369 #define TWI0 (0x40018000U) 370 #define PDC_TWI0 (0x40018100U) 371 #define TWI1 (0x4001C000U) 372 #define PDC_TWI1 (0x4001C100U) 373 #define PWM (0x40020000U) 374 #define PDC_PWM (0x40020100U) 375 #define USART0 (0x40024000U) 376 #define PDC_USART0 (0x40024100U) 377 #define USART1 (0x40028000U) 378 #define PDC_USART1 (0x40028100U) 379 #define UDP (0x40034000U) 380 #define ADC (0x40038000U) 381 #define PDC_ADC (0x40038100U) 382 #define DACC (0x4003C000U) 383 #define PDC_DACC (0x4003C100U) 384 #define ACC (0x40040000U) 385 #define CRCCU (0x40044000U) 386 #define SMC (0x400E0000U) 387 #define MATRIX (0x400E0200U) 388 #define PMC (0x400E0400U) 389 #define UART0 (0x400E0600U) 390 #define PDC_UART0 (0x400E0700U) 391 #define CHIPID (0x400E0740U) 392 #define UART1 (0x400E0800U) 393 #define PDC_UART1 (0x400E0900U) 394 #define EFC (0x400E0A00U) 395 #define PIOA (0x400E0E00U) 396 #define PDC_PIOA (0x400E0F68U) 397 #define PIOB (0x400E1000U) 398 #define PIOC (0x400E1200U) 399 #define RSTC (0x400E1400U) 400 #define SUPC (0x400E1410U) 401 #define RTT (0x400E1430U) 402 #define WDT (0x400E1450U) 403 #define RTC (0x400E1460U) 404 #define GPBR (0x400E1490U) 406 #define HSMCI ((Hsmci *)0x40000000U) 407 #define PDC_HSMCI ((Pdc *)0x40000100U) 408 #define SSC ((Ssc *)0x40004000U) 409 #define PDC_SSC ((Pdc *)0x40004100U) 410 #define SPI ((Spi *)0x40008000U) 411 #define PDC_SPI ((Pdc *)0x40008100U) 412 #define TC0 ((Tc *)0x40010000U) 413 #define TC1 ((Tc *)0x40014000U) 414 #define TWI0 ((Twi *)0x40018000U) 415 #define PDC_TWI0 ((Pdc *)0x40018100U) 416 #define TWI1 ((Twi *)0x4001C000U) 417 #define PDC_TWI1 ((Pdc *)0x4001C100U) 418 #define PWM ((Pwm *)0x40020000U) 419 #define PDC_PWM ((Pdc *)0x40020100U) 420 #define USART0 ((Usart *)0x40024000U) 421 #define PDC_USART0 ((Pdc *)0x40024100U) 422 #define USART1 ((Usart *)0x40028000U) 423 #define PDC_USART1 ((Pdc *)0x40028100U) 424 #define UDP ((Udp *)0x40034000U) 425 #define ADC ((Adc *)0x40038000U) 426 #define PDC_ADC ((Pdc *)0x40038100U) 427 #define DACC ((Dacc *)0x4003C000U) 428 #define PDC_DACC ((Pdc *)0x4003C100U) 429 #define ACC ((Acc *)0x40040000U) 430 #define CRCCU ((Crccu *)0x40044000U) 431 #define SMC ((Smc *)0x400E0000U) 432 #define MATRIX ((Matrix *)0x400E0200U) 433 #define PMC ((Pmc *)0x400E0400U) 434 #define UART0 ((Uart *)0x400E0600U) 435 #define PDC_UART0 ((Pdc *)0x400E0700U) 436 #define CHIPID ((Chipid *)0x400E0740U) 437 #define UART1 ((Uart *)0x400E0800U) 438 #define PDC_UART1 ((Pdc *)0x400E0900U) 439 #define EFC ((Efc *)0x400E0A00U) 440 #define PIOA ((Pio *)0x400E0E00U) 441 #define PDC_PIOA ((Pdc *)0x400E0F68U) 442 #define PIOB ((Pio *)0x400E1000U) 443 #define PIOC ((Pio *)0x400E1200U) 444 #define RSTC ((Rstc *)0x400E1400U) 445 #define SUPC ((Supc *)0x400E1410U) 446 #define RTT ((Rtt *)0x400E1430U) 447 #define WDT ((Wdt *)0x400E1450U) 448 #define RTC ((Rtc *)0x400E1460U) 449 #define GPBR ((Gpbr *)0x400E1490U) 459 #include "pio/pio_sam3s1c.h" 466 #define IFLASH_SIZE (0x10000u) 467 #define IFLASH_PAGE_SIZE (256u) 468 #define IFLASH_LOCK_REGION_SIZE (16384u) 469 #define IFLASH_NB_OF_PAGES (256u) 470 #define IFLASH_NB_OF_LOCK_BITS (4u) 471 #define IRAM_SIZE (0x4000u) 473 #define IFLASH_ADDR (0x00400000u) 474 #define IROM_ADDR (0x00800000u) 475 #define IRAM_ADDR (0x20000000u) 476 #define EBI_CS0_ADDR (0x60000000u) 477 #define EBI_CS1_ADDR (0x61000000u) 478 #define EBI_CS2_ADDR (0x62000000u) 479 #define EBI_CS3_ADDR (0x63000000u) 486 #define CHIP_FREQ_SLCK_RC_MIN (20000UL) 487 #define CHIP_FREQ_SLCK_RC (32000UL) 488 #define CHIP_FREQ_SLCK_RC_MAX (44000UL) 489 #define CHIP_FREQ_MAINCK_RC_4MHZ (4000000UL) 490 #define CHIP_FREQ_MAINCK_RC_8MHZ (8000000UL) 491 #define CHIP_FREQ_MAINCK_RC_12MHZ (12000000UL) 492 #define CHIP_FREQ_CPU_MAX (64000000UL) 493 #define CHIP_FREQ_XTAL_32K (32768UL) 494 #define CHIP_FREQ_XTAL_12M (12000000UL) 497 #define CHIP_FLASH_WRITE_WAIT_STATE (6U) 500 #define CHIP_FREQ_FWS_0 (17000000UL) 501 #define CHIP_FREQ_FWS_1 (30000000UL) 502 #define CHIP_FREQ_FWS_2 (54000000UL) 503 #define CHIP_FREQ_FWS_3 (64000000UL) void SysTick_Handler(void)
SysTick_Handler.
Definition: main.c:78
void BusFault_Handler(void)
Definition: FreeRTOS_ARM.c:104
void UsageFault_Handler(void)
Definition: FreeRTOS_ARM.c:109
Definition: sam3s1c.h:104
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
Definition: sam3n00a.h:102
IRQn
Definition: ARMCM0.h:35
volatile const uint32_t RoReg
Definition: sam3s1c.h:49
CMSIS Cortex-M3 Core Peripheral Access Layer Header File.
CMSIS Cortex-M# Device Peripheral Access Layer Header File for SAM3 devices.
Definition: sam3s1c.h:103
void HardFault_Handler(void)
Definition: FreeRTOS_ARM.c:99
Definition: sam3s1c.h:107
Definition: sam3s1c.h:101
Definition: sam3s1c.h:100
Definition: sam3s1c.h:102
volatile uint32_t RwReg
Definition: sam3s1c.h:54
Definition: sam3s1c.h:105
Definition: sam3s1c.h:108
Definition: sam3s1c.h:106
volatile uint32_t WoReg
Definition: sam3s1c.h:53
Definition: sam3s1c.h:110