arm: cmsis: Convert _ScbActiveVectorGet to use direct CMSIS register access

Jira: ZEP-1568

Change-Id: Ibbb3f71d7ee42ab62f764d45bd334c7840b3c04d
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-01-27 20:39:05 -06:00 committed by Maureen Helm
commit a033a89d76
2 changed files with 1 additions and 16 deletions

View file

@ -360,7 +360,7 @@ static void _FaultDump(const NANO_ESF *esf, int fault)
*/
void _Fault(const NANO_ESF *esf)
{
int fault = _ScbActiveVectorGet();
int fault = SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk;
FAULT_DUMP(esf, fault);

View file

@ -44,21 +44,6 @@ extern "C" {
#include <misc/util.h>
#include <stdint.h>
/**
*
* @brief Obtain the currently executing vector
*
* If currently handling an exception/interrupt, return the executing vector
* number. If not, return 0.
*
* @return the currently executing vector number, 0 if in thread mode.
*/
static inline uint32_t _ScbActiveVectorGet(void)
{
return __scs.scb.icsr.bit.vectactive;
}
#if defined(CONFIG_ARMV6_M)
#elif defined(CONFIG_ARMV7_M)
/**