2015-05-13 09:06 AM
Im using stm32f100rct6b. My bootloader is at memory address 0x08000000, and main program is at 0x08010000. When I jump to the main program my SysTick handler isn't working. I've tried changing ''#define VECT_TAB_OFFSET 0x0'' to ''#define VECT_TAB_OFFSET 0x10000 ''
2015-05-14 08:13 AM
The value that ends up in SCB->VTOR is what the processor cares about.
Would make sure SystemInit() is doing what you want/expect, and not making assumptions about the system entering in reset conditions, presumably your boot loader has enabled clocks, and got the PLL running, etc.2015-05-15 01:37 AM
If you haven't already, take a look at the STM32F10xxx in-application programming example, where a bootloader is made to jump to application. Perhaps it contains some pointers to what you're tryint to achieve.
http://www.st.com/web/en/catalog/tools/PF2578442015-05-18 07:31 AM
The value for ''SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET;'' is 0x8010000 as I would expect.
I have also tried running the function ''NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x10000);'' as soon as the program jumps, but this didn't help.Interrupts are still not working, I have tested USART1_IRQHandler and SysTick_Handler with breakpoints, they are never called.2015-05-18 08:36 AM
Then you're going to have to start digging into the .MAP file and linker output at little, a start debugging.
If you're calling from an RTOS or Interrupt then you're going to have to stop doing that and think about the user/supervisor state the processor's in.Confirm the vectors in the table point where you expect. Make sure you have a Hard Fault Handler set up in the Boot Loader and Application to catch gross failures.Step through the code, review the processor/peripheral states.Really not enough meat in the posts to draw much from.2015-05-19 02:48 AM
Please find attached a simplified version of my boot loader and main application.
The boot loader set's LED1 and jumps to the main application. The main application then set's LED4, and should blink LED3 using SysTick. LED4 get's lit, but LED3 dosnt blink. I'm using CooCox CoIDEVersion: 1.7.7 ________________ Attachments : Bootloader.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzXk&d=%2Fa%2F0X0000000bNN%2FsjDQ8bNs.lklvZ03TVrMPerVp2guupQOhDg4j3Jnhm8&asPdf=false2015-05-19 03:15 AM
Found the issue.
I was disabling interupts in the boot loader with ''__set_PRIMASK(1); ''I added ''__enable_irq();'' to the first line of main application to re-enable interrupt's.