cancel
Showing results for 
Search instead for 
Did you mean: 

NVIC_Init hardfault?

anm
Associate II
Posted on February 20, 2009 at 10:30

NVIC_Init hardfault?

7 REPLIES 7
anm
Associate II
Posted on May 17, 2011 at 13:03

Hello!

I've a problem with NVIC_Init function. When I use NVIC_Init for USART1 it works correctly. But when I use it with USART2, I get a hardfault - why? I'm searching now for about 2 hours, but I can't find the problem.

My Code:

http://rafb.net/p/sCfmlT80.html

I also found a post in here, which said, that I should rebuild the whole project - this also does not work.

thanks for help

Andi

[ This message was edited by: anm on 18-02-2009 21:32 ]

[ This message was edited by: anm on 18-02-2009 22:07 ]

daviddavid91
Associate II
Posted on May 17, 2011 at 13:03

What about the interrupt handler?

Have Du implemented it correctly, i.e. in the same way like for USART1?

anm
Associate II
Posted on May 17, 2011 at 13:03

Hi!

I deleted the whole Code in USART1 and USART2 Interrupt Handler. The Error occurs at the Init - I stepped through the program - but he does not go over the Init function.

Does it help, when I post my Interrupt-Handlers?

Thanks!

giles
Associate II
Posted on May 17, 2011 at 13:03

Can you post your interrupt handlers

Giles

anm
Associate II
Posted on May 17, 2011 at 13:03

Hi!

Sure, I will post everything ;)

The Interrupt-Handlers are from the example...

stm32f10x_it.c:

http://rafb.net/p/Bxst8Y22.html

stm32f10x_it.h:

http://rafb.net/p/UlgfSH28.html

and to complete the files:

stm32f10x_conf.h:

http://rafb.net/p/w4Xs5x47.html

Thanks!

anm
Associate II
Posted on May 17, 2011 at 13:03

I tested some other things (other clock source...) - but it does not work - I don't know what to do next...

anm
Associate II
Posted on May 17, 2011 at 13:03

So, now it works! Vectors where false...