cancel
Showing results for 
Search instead for 
Did you mean: 

Systick interrupt not working on BOOT_ADD1 context

ABITT.1
Associate III

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.

23 REPLIES 23

Which STM32?

What is BOOT_ADD1?

JW

ABITT.1
Associate III

The BOOT_ADD1 is the register specifying the start addres of the software when BOOT pin is activated.

berendi
Principal

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.

ABITT.1
Associate III

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)

berendi
Principal

> 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.

berendi
Principal

> 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.

ABITT.1
Associate III

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.

berendi
Principal

> 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?

ABITT.1
Associate III

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