10.07.2015 Views

PDF version - ARM Information Center

PDF version - ARM Information Center

PDF version - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

프로세서 예외 처리참고수정 버전 0 Cortex-M3 프로세서를 사용하는 경우에는 STKALIGN이 지원되지않으므로 하드웨어에서 조정이 수행되지 않아 소프트웨어가 조정을 수행해야 합니다. 컴파일러는 스택을 올바르게 정렬하는 IRQ 처리기에서 코드를 생성할 수있습니다. 이를 위해서는 IRQ 처리기 앞에 __irq를 추가하고 --cpu=Cortex-M3가 아니라 --cpu=Cortex-M3-rev0 컴파일러 스위치를 사용해야 합니다.6.3.6 시스템 제어 공간 레지스터 구성SCS (시스템 제어 공간) 레지스터는 0xE000E000에 있습니다. 구조체를 사용하여매우 많은 개별 레지스터와 관련 오프셋을 나타낼 수 있습니다 (예제 6-19 참조) .그런 다음 벡터 테이블에 대해 비슷한 방법을 사용하여 스캐터 로딩 설명 파일을통해 올바른 메모리 위치에 구조체를 배치할 수 있습니다.Cortex-M1 및 Cortex-M3 프로세서 모두에 대해 이 코드 샘플은 예제 디렉토리의install_directory\RVDS\Examples\..\Example3에 있습니다.예제 6-19 SCS 레지스터 구조체 및 정의typedef volatile struct {int MasterCtrl;int IntCtrlType;int zReserved008_00c[2]; /* Reserved space */struct {int Ctrl;int Reload;int Value;int Calibration;} SysTick;int zReserved020_0fc[ (0x100-0x20) /4]; /* Reserved space *//* Offset 0x0100* Additional space allocated to ensure alignment*/struct {int Enable[32];int Disable[32];int Set[32];int Clear[32];int Active[64];6-38 Copyright © 2002-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0203IKNon-ConfidentialUnrestricted Access

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!