Content originally posted in LPCWare by FlorentCapelle on Thu Sep 25 07:11:11 MST 2014
Dear all,
After further investigations, it appears to me that the issue is not related to switching from bank A to bank B, nor to the VTOR register.
Instead, it seems the issue comes when changing the M3MEMMAP value.
Let me list the new test steps I took and what is the result:
- the application is now linked @0x00000000 and copied @0x1A004000
- the current value of M3MEMAP is 0x1A000000 (the bootloader runs there)
- the bootloader sets the stack pointer to the value contained in address 0x1A004000
- sets the VTOR register to 0x1A004000
- sets the M3MEMMAP register to 0x1A004000
- jumps to the address contained in address 0x1A004004
Result:
The bootloader jumps correctly to the entry function of my application. However, as soon as the entry function jumps to another function, a [u]bus fault happens[/u].
So I am now not suspicious about the VTOR anymore, but about the changing of M3MEMMAP value.
Best regards,
Florent.