2020-03-05 10:46 PM
Hello,
Currently, I'm working on a project in which the boat-loader is already present. Now, in the boat-loader, there are several things which I'm not using i.e Systick clock, DMA etc. So, I want to De-init all the unnecessary peripherals to run the CPU more efficiently. Unfortunately, I couldn't find anything related to how can I Dinit the Systick.
I'm using STM32F103CBT6 and Standard peripheral Library ( STSW-STM32054 ).
2020-03-21 03:31 AM
/*!< Uncomment the following line if you need to relocate your vector Table in Internal SRAM. */
/* #define VECT_TAB_SRAM */
#define VECT_TAB_OFFSET 0x0
/*!< Vector Table base offset field. This value must be a multiple of 0x200. */
#ifdef VECT_TAB_SRAM
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET;
/* Vector Table Relocation in Internal SRAM. */
#else
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET;
/* Vector Table Relocation in Internal FLASH. */
#endif
I've noticed, the VECT_TAB_OFFSET is same in both the code. I tried multiple combination as well i.e: modify the VECT_TAB_OFFSET by 0x200, un-commented the VECT_TAB_SRAM, but still, I'm facing the same issue.
2020-03-21 11:24 AM
I would safely toss out almost all configuration that bootloader does and start from a "clean" state.
After something like this with probably some other modifications just start as normally.
2020-03-21 10:34 PM
> I tried multiple combination as well i.e: modify the VECT_TAB_OFFSET by 0x200, un-commented the VECT_TAB_SRAM
Why? Can you explain why did you think that any of these gets the address of the application vector table in SCB->VTOR ?
Put the address of the vector table of your application in SCB->VTOR. Verify that it never gets overwritten by some dumb HAL code.
2020-03-23 02:43 AM
thanks Everyone, with all your help, I've successfully solved the issue.
2020-03-23 06:15 AM
I've read the instruction wrongly, Now, I realize I've to give the ( base address - 0x8000000 ) as an offset.