2021-12-06 10:52 PM
Hi everyone!
I have found that the System Memory (Boot ROM) is always mapped to 0x0000_0000 on the STM32L471RET6 that I'm developing on. The Flash Memory is mapped to 0x0800_0000 as expected but as soon as interrupts are triggered they jump to 0x1FFFF_xxxx.
To prevent this SCB_VTOR must be set to 0x0800_0000 by defining USER_VECT_TAB_ADDRESS so that code in system_stm32l4xx.c:SystemInit() is compiled in.
As far as I can tell there are two settings in the Reference Manual that can affect this. The BFB2 bit in User Options and the SYSCFG_MEMRMP:MEM_MODE[2:0] register.
I have checked and SYSCFG_MEMRMP = 0x0000_0000 and @0x1FFFF_7800 = 0xFF
EF_F8AA and FLASH_OPTR = 0xFFEF_F8AA so no surprises there.
Can anyone confirm that this is indeed a bug? Did I miss something?
Thanks in advance,
Pieter
P.S. I checked and the STM32L476 on the NUCLEO-L476RG does not exhibit this problem.
Solved! Go to Solution.
2021-12-06 11:13 PM
Is the BOOT0 pin low?
2021-12-06 11:13 PM
Is the BOOT0 pin low?
2021-12-06 11:29 PM
Sorry, forgot to add that detail: yes, the BOOT0 pin is low.
2021-12-06 11:38 PM
Oh wait! Somewhere I must have lost the plot :pensive_face: Thanks @KnarfB ! I checked again and there was the jumper indeed, pulling BOOT0 high. There must have been a mix up somewhere during the investigation and it's hard to spot (black on black). I've removed the offending jumper and now the memory map is OK.
Apologies!
Pieter