cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0 bootloader int vect tab problem

skolodzi
Associate II
Posted on January 23, 2016 at 12:23

Hi everyone,

I have problem with bootloader in STM32F0. I used Coocox and I read many topics about bootloader and RAM remap on this procesor and I've done everything with this. Debug is working fine I can go inside into my C code, but IRQ handlers doesn't work. It seems like Interrupt Vector Table doesn't work. Could you help me?
7 REPLIES 7
Posted on January 23, 2016 at 14:35

Sorry I don't use CooCox or have a crystal ball.

Should function like other GNU/GCC based products. Would start by suggesting you print out the 32-bit vectors you currently have at 0x20000000 and 0x00000000. Showing your work. Make sure you are enabling the SYSCFG clock, not resetting it.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
skolodzi
Associate II
Posted on January 23, 2016 at 15:13

Ok, Firstable I checked this and I enable SYSCFG and I copied first 192B from address 8005000 (this start adress for my application) and I saved it in RAM ( From20000000 to

200000C0) and this is what I have -

Attachments

My code :

__IO uint32_t VectorTable[48] __attribute__((at(0x20000000)));

for(i = 0; i < 48; i++)

{

VectorTable[i] = *(__IO uint32_t*)(0x08005000 + (i<<2));

}

RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); // Clock not Reset

SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);

________________

Attachments :

RAM_ROM.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0uf&d=%2Fa%2F0X0000000bfV%2FS4mjrtJfGHfpMNlboiVB023.rZUitk19W7vg5qwWv.I&asPdf=false
Radosław
Senior II
Posted on January 23, 2016 at 15:28

__IO uint32_t VectorTable[48] __attribute__((at(0x20000000)));

 This is not elegant.  Probably this is reason to working only on debuger.

You should edit Linker script.

8005000 this is adres aplication or bootloader?

Bootloader start address?

You can write to me directly tadzik85@o2.pl (Polak)

re.wolff9
Senior
Posted on January 23, 2016 at 15:43

On F030 the vector table cannot be at 0x20000000. The vector table is at 0x0000. 

You can control what goes at 0x0000000 by poking the right values into the syscfg register.... 

Posted on January 23, 2016 at 18:28

On F030 the vector table cannot be at 0x20000000. The vector table is at 0x0000.  You can control what goes at 0x0000000 by poking the right values into the syscfg register.... 

Yes, the remap shadows it at both addresses.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 23, 2016 at 18:36

Unfortunately the graphic lacks context. If the base of one is 0x20000000 and 0x08005000 you've already lost alignment of the table.

You'll need to look at where this code is, how control is past, etc.

Does the loader enable interrupts? SysTick, or whatever

Do you have serials ports, or LEDs you can use to identify where things are stuck when the debugger isn't used

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
skolodzi
Associate II
Posted on January 23, 2016 at 19:33

Resolved! :) I've added vector table copy and remap in bootloader file. I also added disable all interrupts in bootloader. In application file I added only enable interrupts and it works ! Many thanks for help ! Special thanks for  !!!! :)