running lpc82x periph_adc example getting HardFault_Handler everytime.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

running lpc82x periph_adc example getting HardFault_Handler everytime.

Jump to solution
686 Views
chestertai
Contributor I

I am using LPC82x xpresso v2/mbed development board and running the periph_adc example.  After enable ADC sequencer

Chip_ADC_EnableSequencer(LPC_ADC, ADC_SEQA_IDX);

The program will jump to HardFault_Handler.  Anyone seen this happeded?

0 Kudos
Reply
1 Solution
577 Views
victorjimenez
NXP TechSupport
NXP TechSupport

  Hello Chester! 

As I mentioned in the case, the problem is in the file cr_startup_lpc82x.c since it lacks some interrupt handler. The example of the ADC provided in the code bundle works fine. If you compare the file mentioned before with the same one but of the code bundle you will see the differences, as shown below. 

pastedImage_2.png

Please replace all the lines in the cr_startup_lpc82x.c file of the LPCOpen 3_02 to match the one of the code bundle. Once you make these changes the demo should work as expected. 

Hope it helps!

Victor.

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
1 Reply
578 Views
victorjimenez
NXP TechSupport
NXP TechSupport

  Hello Chester! 

As I mentioned in the case, the problem is in the file cr_startup_lpc82x.c since it lacks some interrupt handler. The example of the ADC provided in the code bundle works fine. If you compare the file mentioned before with the same one but of the code bundle you will see the differences, as shown below. 

pastedImage_2.png

Please replace all the lines in the cr_startup_lpc82x.c file of the LPCOpen 3_02 to match the one of the code bundle. Once you make these changes the demo should work as expected. 

Hope it helps!

Victor.

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply