Hardfault when reading DigitalIn p15

21 Mar 2014

Dear all,

I'm running on an NXP LPC1768 board together with the application board and I am experiencing an issue when reading the digital input p15 which is connected to joystick up position while I'm developing a menu for an application.

Whenever the program tries to read this input, regardless the way its defined (DigitalIn or BusIn) the software goes into some kind of exception or interrupt named "HardFault".

I used a joystick sample program published by one of the mbed community members and it works fine, but I can't figure why in my program its not working fine. Attached there is a printscreen when debugging with Keil and bellow the link to my program.

/media/uploads/Mircea3M/hardware_fault.png

I read the pins value within the menu.cpp file.

Import program0007_Menu

application for developing a menu

Perhaps you have an idea of what I am not doing good.

Thanks a lot, Mircea