EXT Driver Crashing on STM32F4 Discovery

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Graeme
Posts: 13
Joined: Fri Mar 01, 2013 10:26 am

Re: EXT Driver Crashing on STM32F4 Discovery

Post 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
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: EXT Driver Crashing on STM32F4 Discovery

Post by Giovanni »

It is defined in chcore_v7m.h and documented in the ARMCMx port document.

Giovanni
Graeme
Posts: 13
Joined: Fri Mar 01, 2013 10:26 am

Re: EXT Driver Crashing on STM32F4 Discovery

Post 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
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: EXT Driver Crashing on STM32F4 Discovery

Post by Giovanni »

You need to create specific board files AND settings in mcuconf.h when porting on new boards.

Giovanni
Graeme
Posts: 13
Joined: Fri Mar 01, 2013 10:26 am

Re: EXT Driver Crashing on STM32F4 Discovery

Post 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
Post Reply