Page 1 of 2

EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 7:14 am
by Graeme
Hi,

I am trying to get the EXT driver working on STM32F4 Discovery. When in debug mode I can see that the interrupt from the push buuton is being "seen" by the ext_lld_isr interrupt routine for EXT_Line0.
However, afer a few times of receiving this interrupt I notice the system has crashed and the program counter is sitting at _unhandles_exception.

I am using stock standard chibios 2.6.1 with the example out of the testhal directory for EXT.

Any help with this would be appreciated.

Kind regards

Graeme

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 9:48 am
by Giovanni
Hi,

Probably it depends on what you have in the EXT callback, hard to tell without code. Also, are you running with debug options enabled?

Giovanni

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 11:01 am
by Graeme
HI Giovanni,

Callback is as in the testhal example(part of Chibios). However, my ST32F407 is getting really warm. Am starting to suspect a board fault. I have sanother one to test wit

Thanks

Graeme

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 11:01 am
by Giovanni
Uhm, yes, it is likely.

Giovanni

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 4:27 pm
by Graeme
Hi Giovanni,

Have tested the it again with a new working STM32F4 discovery board. Still the same problem.

System setup: Standard latest Chibios. Replaced the demo main.c for Discovery board with the main.c in testhal\EXT\
All optimisations turned off. Debugging turned on. Compiled with no warnings,no errors. Still hangs after around 4 interrupts.

Tried baremetal code for EXT. Works fine.

any further ideas?

Kind regards
Graeme

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 4:33 pm
by Giovanni
What toolchain are you using?

Giovanni

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 5:02 pm
by Graeme
Am using the code 32k limited version of Keil

Re: EXT Driver Crashing on STM32F4 Discovery

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

It is likely a project setup problem, see at the existing Keil demos, there are settings to do, especially about the linker and memory areas.

Do existing Keil demos work for you?

Giovanni

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 5:13 pm
by Graeme
If you mean existing keil demos for Chibios then yes. The only one I have really tried is the STM32F4 Discovery demo . Flashes a few LEDS etc.
That one works perfectly and runs indefintely.

Graeme

Re: EXT Driver Crashing on STM32F4 Discovery

Posted: Sun Dec 29, 2013 5:19 pm
by Giovanni
Hi, you should start from that project and add the drivers you need, there are several settings to be done in the various option tabs. You should compare your project with the demo tab by tab.

Giovanni