mbed-os

Fork of mbed-os by erkin yucel

Committer:
elessair
Date:
Sun Oct 23 15:10:02 2016 +0000
Revision:
0:f269e3021894
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elessair 0:f269e3021894 1 /**
elessair 0:f269e3021894 2 ******************************************************************************
elessair 0:f269e3021894 3 * @file architecture.h
elessair 0:f269e3021894 4 * @brief CM3 architecture specific inclusions and defines.
elessair 0:f269e3021894 5 * @internal
elessair 0:f269e3021894 6 * @author ON Semiconductor
elessair 0:f269e3021894 7 * $Rev: $
elessair 0:f269e3021894 8 * $Date: $
elessair 0:f269e3021894 9 ******************************************************************************
elessair 0:f269e3021894 10 * Copyright 2016 Semiconductor Components Industries LLC (d/b/a “ON Semiconductor”).
elessair 0:f269e3021894 11 * All rights reserved. This software and/or documentation is licensed by ON Semiconductor
elessair 0:f269e3021894 12 * under limited terms and conditions. The terms and conditions pertaining to the software
elessair 0:f269e3021894 13 * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf
elessair 0:f269e3021894 14 * (“ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software”) and
elessair 0:f269e3021894 15 * if applicable the software license agreement. Do not use this software and/or
elessair 0:f269e3021894 16 * documentation unless you have carefully read and you agree to the limited terms and
elessair 0:f269e3021894 17 * conditions. By using this software and/or documentation, you agree to the limited
elessair 0:f269e3021894 18 * terms and conditions.
elessair 0:f269e3021894 19 *
elessair 0:f269e3021894 20 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
elessair 0:f269e3021894 21 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
elessair 0:f269e3021894 22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
elessair 0:f269e3021894 23 * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL,
elessair 0:f269e3021894 24 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
elessair 0:f269e3021894 25 * @endinternal
elessair 0:f269e3021894 26 *
elessair 0:f269e3021894 27 * @ingroup bsp
elessair 0:f269e3021894 28 */
elessair 0:f269e3021894 29
elessair 0:f269e3021894 30 #ifndef ARCHITECTURE_H_
elessair 0:f269e3021894 31 #define ARCHITECTURE_H_
elessair 0:f269e3021894 32
elessair 0:f269e3021894 33 /*************************************************************************************************
elessair 0:f269e3021894 34 * *
elessair 0:f269e3021894 35 * Header files *
elessair 0:f269e3021894 36 * *
elessair 0:f269e3021894 37 *************************************************************************************************/
elessair 0:f269e3021894 38
elessair 0:f269e3021894 39 //#include <ncs36510.h>
elessair 0:f269e3021894 40 //#include <system_ncs36510.h>
elessair 0:f269e3021894 41 //#include <core_cm3.h>
elessair 0:f269e3021894 42
elessair 0:f269e3021894 43 #include "NCS36510.h"
elessair 0:f269e3021894 44 #include "system_NCS36510.h"
elessair 0:f269e3021894 45 #include "core_cm3.h"
elessair 0:f269e3021894 46 #include "cmsis.h"
elessair 0:f269e3021894 47
elessair 0:f269e3021894 48
elessair 0:f269e3021894 49 /*************************************************************************************************
elessair 0:f269e3021894 50 * *
elessair 0:f269e3021894 51 * Symbolic Constants *
elessair 0:f269e3021894 52 * *
elessair 0:f269e3021894 53 *************************************************************************************************/
elessair 0:f269e3021894 54
elessair 0:f269e3021894 55 /* Interrupt Control and State Register (0xE000ED04)
elessair 0:f269e3021894 56 * 31 NMIPENDSET R/W 0 NMI pended
elessair 0:f269e3021894 57 * 28 PENDSVSET R/W 0 Write 1 to pend system call; Read value
elessair 0:f269e3021894 58 * indicates pending status
elessair 0:f269e3021894 59 * 27 PENDSVCLR W 0 Write 1 to clear PendSV pending status
elessair 0:f269e3021894 60 * 26 PENDSTSET R/W 0 Write 1 to pend Systick exception; Read
elessair 0:f269e3021894 61 * value indicates pending status
elessair 0:f269e3021894 62 * 25 PENDSTCLR W 0 Write 1 to clear Systick pending status
elessair 0:f269e3021894 63 * 23 ISRPREEMPT R 0 Indicate that a pending interrupt is going
elessair 0:f269e3021894 64 * to be active in next step (for debug)
elessair 0:f269e3021894 65 * 22 ISRPENDING R 0 External interrupt pending (excluding
elessair 0:f269e3021894 66 * system exceptions such as NMI for
elessair 0:f269e3021894 67 * fault)
elessair 0:f269e3021894 68 * 21:12 VECTPENDING R 0 Pending ISR number
elessair 0:f269e3021894 69 * 11 RETTOBASE R 0 Set to 1 when the processor is running
elessair 0:f269e3021894 70 * an exception handler and will return to
elessair 0:f269e3021894 71 * thread level if interrupt return and no
elessair 0:f269e3021894 72 * other exceptions pending
elessair 0:f269e3021894 73 * 9:0 VECTACTIVE R 0 Current running interrupt service routine
elessair 0:f269e3021894 74 */
elessair 0:f269e3021894 75 #define RUNNING_IN_ISR (((SCB->ICSR & 0x3FF) > 0 ) ? 1 : 0)
elessair 0:f269e3021894 76
elessair 0:f269e3021894 77 #endif /* ARCHITECTURE_H_ */