Vector table must be 256 aligned

The vector table must be 256 aligned to work reliably, it must have been working by accident up to now.  This modification tested on a u-blox c027 board.  Without the change the value of `SCB->VTOR` and int_table are as follows:

`SCB->VTOR 0x10000280, int_table 0x100002a0`

...with the change they are as follows:

`SCB->VTOR 0x10000400, int_table 0x10000400`

...and the test passes.

See issue:

https://github.com/mbedmicro/mbed/issues/992
pull/994/head
Rob Meades 2015-03-23 14:58:30 +00:00
parent d1d900d30c
commit 04d5c19e69
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ DigitalOut out(PIN_OUT);
DigitalOut myled(LED1);
volatile int checks = 0;
uint32_t int_table[NUM_VECTORS];
uint32_t int_table[NUM_VECTORS] __attribute__ ((aligned(256)));
#define FALLING_EDGE_COUNT 5