2020-06-21 10:40 PM
Hi,
I develop a software using delay (and do Systick resource). This software works fine when it's mapped @0x08000000 and using BOOT_ADD0.
But, when I maps it @0x08008000 and use BOOT_ADD1, no Systick raises !
Somebody has already resolve this problem.
Thanks in advance.
2020-06-21 10:52 PM
Which STM32?
What is BOOT_ADD1?
JW
2020-06-22 12:02 AM
The BOOT_ADD1 is the register specifying the start addres of the software when BOOT pin is activated.
2020-06-22 02:49 AM
Which STM32?
Does the application otherwise work, i.e. whatever you do in the main thread gets done?
How do you "use" BOOT_ADD1? Setting boot pins or or option bits? Which way?
What does SCB->VTOR contain?
Read out the word value at 0x0800803C (SysTick interrupt vector, see the NVIC chapter of the reference manual). Compare the value with the address of SysTick_Handler in the .map file.
2020-06-22 07:03 AM
I use STM32F746ZG
Yes, the application works fine when it is built to run from 0x08000000. I just modified the booting address to 0x08008000.
This is done modifying the LD file and the BOOT_ADD1 byte option (using STM32CubeProgrammer tool).
The BOOT_ADD1 byte option allows to use specific boot address, depending on the BOOT pin state.
to be clear...
The same application is built on 0x08000000 and 0x080080000.
the two generated application are programmed into flash memory at the correct address (0x08000000 and 0x08008000).
I compared the two flash aera, no difference found.
I use STM32CubeProgrammer tool to modify the byte Option, BOOT_ADD0 = 0x2002 and BOOT_ADD1 = 0x2000.
when I set BOOT pin at 0, the appliaction works fine
When I set BOOT pin at 1, the appliaction don't work. I seen that no Systick interrupt raises (using STM32Cube IDE to debugging, with beakpoint into the Systick handler)
2020-06-22 07:11 AM
> BOOT_ADD0 = 0x2002 and BOOT_ADD1 = 0x2000.
> when I set BOOT pin at 0, the appliaction works fine
> When I set BOOT pin at 1, the appliaction don't work.
BOOT_ADD0 = 0x2002 corresponds to starting at 0x08008000 when the boot pin is 0
BOOT_ADD1 = 0x2000 corresponds to starting at 0x08000000 when the boot pin is 1
So this is the opposite of what you wrote in the original question. Decide which way it actually is.
2020-06-22 07:26 AM
> I compared the two flash aera, no difference found.
So the application is not linked properly for one of the addresses. At the very least the interrupt vectors, memory initialization and the instructions setting SCB->VTOR should be different between the images.
There are some IDEs with a slightly broken build process that does not pick up changes in the *.ld file. Try cleaning the project and rebuild after changing the linker script.
2020-06-23 04:45 AM
Sorry, I probably not clear on my explanation :(
My comparaison between the code of sector 0 on the Flash and the code of sector 1 on the flash, has been done with an external tool (dump of each sector in hexadecimals using STM32cubeIDE and compar using notePad++).
I verify the interrupt vector table directly into the Flash (at the 0x08008003C), the address correspond to the 'systick_Handler' procedure is correct.
2020-06-23 04:59 AM
> My comparaison between the code of sector 0 on the Flash and the code of sector 1 on the flash, has been done with an external tool (dump of each sector in hexadecimals using STM32cubeIDE and compar using notePad++).
Again, if they are identical, then it will not work.
> I verify the interrupt vector table directly into the Flash (at the 0x08008003C), the address correspond to the 'systick_Handler' procedure is correct.
What is the address at 0x08000003C and at 0x08008003C?
2020-06-23 05:06 AM
You have probably raison on the compar.
the 0x0800003C and the 0x0800803C are into the interrupt vector table and correspond to the systick hanlder.
I'll verify my code generation.
thanks for your responses