Skip to content
Snippets Groups Projects
Commit 6dcb524d authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Correct the initial value of the BASEPRI register. This was apparently never...

 Correct the initial value of the BASEPRI register.  This was apparently never being initialized.  From Max
parent 6b5ed6c8
No related branches found
No related tags found
No related merge requests found
/**************************************************************************** /****************************************************************************
* arch/arm/src/armv7-m/up_initialstate.c * arch/arm/src/armv7-m/up_initialstate.c
* *
* Copyright (C) 2009, 2011-2013 Gregory Nutt. All rights reserved. * Copyright (C) 2009, 2011-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -147,10 +147,18 @@ void up_initial_state(struct tcb_s *tcb) ...@@ -147,10 +147,18 @@ void up_initial_state(struct tcb_s *tcb)
/* Enable or disable interrupts, based on user configuration */ /* Enable or disable interrupts, based on user configuration */
#ifdef CONFIG_SUPPRESS_INTERRUPTS #ifdef CONFIG_SUPPRESS_INTERRUPTS
#ifdef CONFIG_ARMV7M_USEBASEPRI #ifdef CONFIG_ARMV7M_USEBASEPRI
xcp->regs[REG_BASEPRI] = NVIC_SYSH_DISABLE_PRIORITY; xcp->regs[REG_BASEPRI] = NVIC_SYSH_DISABLE_PRIORITY;
#else #else
xcp->regs[REG_PRIMASK] = 1; xcp->regs[REG_PRIMASK] = 1;
#endif #endif
#else /* CONFIG_SUPPRESS_INTERRUPTS */
#ifdef CONFIG_ARMV7M_USEBASEPRI
xcp->regs[REG_BASEPRI] = NVIC_SYSH_MAXNORMAL_PRIORITY;
#endif
#endif /* CONFIG_SUPPRESS_INTERRUPTS */ #endif /* CONFIG_SUPPRESS_INTERRUPTS */
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment