Skip to main content
Visitor II
June 22, 2020
Question

Systick interrupt not working on BOOT_ADD1 context

  • June 22, 2020
  • 23 replies
  • 3163 views

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.

    This topic has been closed for replies.

    23 replies

    Super User
    June 22, 2020

    Which STM32?

    What is BOOT_ADD1?

    JW

    ABITT.1Author
    Visitor II
    June 22, 2020

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

    Visitor II
    June 22, 2020

    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.1Author
    Visitor II
    June 22, 2020

    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)

    Visitor II
    June 22, 2020

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

    Visitor II
    June 22, 2020

    > 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.1Author
    Visitor II
    June 23, 2020

    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.

    Visitor II
    June 23, 2020

    > 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.1Author
    Visitor II
    June 23, 2020

    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

    Visitor II
    June 23, 2020

    > the 0x0800003C and the 0x0800803C are into the interrupt vector table and correspond to the systick hanlder.

    What are the values there?