running lpc82x periph_adc example getting HardFault_Handler everytime.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

running lpc82x periph_adc example getting HardFault_Handler everytime.

跳至解决方案
941 次查看
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 项奖励
回复
1 解答
832 次查看
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 项奖励
回复
1 回复
833 次查看
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 项奖励
回复