cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader

brian239955_st
Associate II
Posted on May 13, 2015 at 18:06

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

6 REPLIES 6
Posted on May 14, 2015 at 17:13

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
daniel239955_st
Associate II
Posted on May 15, 2015 at 10:37

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/PF257844

brian239955_st
Associate II
Posted on May 18, 2015 at 16:31

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.

Posted on May 18, 2015 at 17:36

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
brian239955_st
Associate II
Posted on May 19, 2015 at 11:48

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=false
brian239955_st
Associate II
Posted on May 19, 2015 at 12:15

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.