cc2538: nvic: Simplify VTABLE configuration
The only thing needed for VTABLE is the absolute address of the vector table. Splitting it between code/SRAM base and offset complicates things and brings nothing. Consequently, this commit merges the NVIC VTABLE configurations into a single one giving the vector table absolute address. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
This commit is contained in:
parent
efb4b858e2
commit
a191fcdb84
|
@ -57,7 +57,7 @@ nvic_init()
|
||||||
interrupt_unpend = (uint32_t *)NVIC_UNPEND0;
|
interrupt_unpend = (uint32_t *)NVIC_UNPEND0;
|
||||||
|
|
||||||
/* Provide our interrupt table to the NVIC */
|
/* Provide our interrupt table to the NVIC */
|
||||||
REG(SCB_VTABLE) = (NVIC_CONF_VTABLE_BASE + NVIC_CONF_VTABLE_OFFSET);
|
REG(SCB_VTABLE) = NVIC_VTABLE_ADDRESS;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
|
|
|
@ -48,18 +48,13 @@
|
||||||
/** \name NVIC Constants and Configuration
|
/** \name NVIC Constants and Configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define NVIC_VTABLE_IN_SRAM 0x20000000
|
|
||||||
#define NVIC_VTABLE_IN_CODE 0x00000000
|
|
||||||
|
|
||||||
#define NVIC_INTERRUPT_ENABLED 0x00000001
|
#define NVIC_INTERRUPT_ENABLED 0x00000001
|
||||||
#define NVIC_INTERRUPT_DISABLED 0x00000000
|
#define NVIC_INTERRUPT_DISABLED 0x00000000
|
||||||
|
|
||||||
#ifndef NVIC_CONF_VTABLE_BASE
|
#ifdef NVIC_CONF_VTABLE_ADDRESS
|
||||||
#define NVIC_CONF_VTABLE_BASE NVIC_VTABLE_IN_CODE
|
#define NVIC_VTABLE_ADDRESS NVIC_CONF_VTABLE_ADDRESS
|
||||||
#endif
|
#else
|
||||||
|
#define NVIC_VTABLE_ADDRESS 0x200000
|
||||||
#ifndef NVIC_CONF_VTABLE_OFFSET
|
|
||||||
#define NVIC_CONF_VTABLE_OFFSET 0x200000
|
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
Loading…
Reference in a new issue