There's a general problem:
An access to adress 0x1FFFFFFF with more than a byte (int16_t or bigger) causes a fault.
I found,that this is documented in the Reference Manual in chapter 3.5.3.4, too:
This can(!) cause problems, because normally you don't know where a variable is stored.
Solution: All variables (> 1 Byte, including arrays and structures, stack and heap) located in this region should be aligned to - at minimum- 2 (i think this is not possible)
- or - the linker script has to define two (RAM) memory regions
- or - ignore it and hope that your program works as expected if it uses more than 32kB RAM(Teensy 3.1)
This took me some time....
An access to adress 0x1FFFFFFF with more than a byte (int16_t or bigger) causes a fault.
I found,that this is documented in the Reference Manual in chapter 3.5.3.4, too:
Burst-access cannot occur across the 0x2000_0000 boundary
that separates the two SRAM arrays. The two arrays should be
treated as separate memory ranges for burst accesses.
This can(!) cause problems, because normally you don't know where a variable is stored.
Solution: All variables (> 1 Byte, including arrays and structures, stack and heap) located in this region should be aligned to - at minimum- 2 (i think this is not possible)
- or - the linker script has to define two (RAM) memory regions
- or - ignore it and hope that your program works as expected if it uses more than 32kB RAM(Teensy 3.1)
This took me some time....
Last edited: