Page 2 of 2

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 5:32 pm
by Graeme
Hi Giovanni,

Thanks for your help on this. Will dig a bit deeper.

However, on thing that I have seen is

#if CORTEX_SIMPLIFIED_PRIORITY
mov r3, #SCB_ICSR :AND: 0xFFFF
movt r3, #SCB_ICSR :SHR: 16
mov r2, #ICSR_PENDSVSET
str r2, [r3, #0]
cpsie i
waithere b waithere
#else
svc #0 /*This is the last line that gets executed and get sexecuted after exiting the EXT interrupt*/

What does CORTEX_SIMPLIFIED_PRIORITY do, and should I have it defined?

Thanks again for your help.

Graeme

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 5:44 pm
by Giovanni
It is defined in chcore_v7m.h and documented in the ARMCMx port document.

Giovanni

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 6:08 pm
by Graeme
Project was set to 25MHz cru\ystal, but STM32F4 only has 8MHz crystal on board.

Changing this to 8MHz has stopped the crashing, but for some reason when pressing the pushbutton, I don't always get an interrupt.

Anyway, I will dig further

Regards
Graeme

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 6:20 pm
by Giovanni
You need to create specific board files AND settings in mcuconf.h when porting on new boards.

Giovanni

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 6:45 pm
by Graeme
Hi Giovanni

Testhal\EXT\main.c test code was disabling the EXT every 5 seconds for 5 seconds. No wonder I was missing interrupts :)

All fixed now and all working

Thanks again

Graeme